functionSource
stringlengths
20
97.4k
CWE-119
bool
2 classes
CWE-120
bool
2 classes
CWE-469
bool
2 classes
CWE-476
bool
2 classes
CWE-other
bool
2 classes
combine
int64
0
1
_tokenize_matrix(char *matrix){ char **ret=NULL; char *p=matrix; int count=0; while(1){ char *h,*t; /* trim leading space */ while(*p && isspace(*p))p++; /* search for seperator */ h=p; while(*h && *h!=',')h++; /* trim trailing space */ t=h; while(t>p && isspace(*(t-1)))t-...
false
false
false
false
false
0
fp_ingredients_fingerprint_differs(string_ty *filename, string_ty *value) { fp_value_ty *vp; int different = 0; trace(("fp_ingredients_fingerprint_differs(filename=\"%s\", " "value=\"%s\")\n{\n", filename->str_text, value->str_text)); vp = fp_search(filename); if (vp) { ...
false
false
false
false
false
0
cgiDecode(const std::vector<unicode_char> &uc, std::map<std::string, std::vector<unicode_char> > &args) { std::vector<unicode_char>::const_iterator b=uc.begin(), e=uc.end(); while (b != e) { std::vector<unicode_char>::const_iterator p=b; std::vector<unicode_char>::const_iterator ee=e; while ...
false
false
false
false
false
0
zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /* {{{ */ { size_t i, j = 0; zend_trait_precedence *cur_precedence; zend_trait_method_reference *cur_method_ref; char *lcname; zend_bool method_exists; /* resolve class references */ if (ce->trait_precedences) { i = 0; while ((cur_precedence ...
false
false
false
false
false
0
gog_legend_update (GogObject *obj) { GogLegend *legend = GOG_LEGEND (obj); unsigned visible; gog_chart_get_cardinality (GOG_CHART (obj->parent), NULL, &visible); if (legend->cached_count != visible) legend->cached_count = visible; else if (!legend->names_changed) return; legend->names_changed = FALSE; gog_ob...
false
false
false
false
false
0
arglist_remove_flag(list_t *list, const char *name) { listitem_t *i = arglist_find(list, name); if (i) { list_remove(list, i); return 1; } return 0; }
false
false
false
false
false
0
s_page_size_changed (GtkWidget * w, AP_UnixDialog_PageSetup *dlg) { UT_return_if_fail(w && dlg); fp_PageSize::Predefined pos = (fp_PageSize::Predefined)gtk_combo_box_get_active(GTK_COMBO_BOX(w)); dlg->event_PageSizeChanged (pos); }
false
false
false
false
false
0
testFormatting() { AutoPtr<TestChannel> pChannel = new TestChannel; AutoPtr<Formatter> pFormatter = new SimpleFormatter; AutoPtr<FormattingChannel> pFormatterChannel = new FormattingChannel(pFormatter, pChannel.get()); Message msg("Source", "Text", Message::PRIO_INFORMATION); pFormatterChannel->log(msg); assert (...
false
false
false
false
false
0
maybe_flush_or_die(FILE *f, const char *desc) { static int skip_stdout_flush = -1; struct stat st; char *cp; if (f == stdout) { if (skip_stdout_flush < 0) { cp = getenv("GIT_FLUSH"); if (cp) skip_stdout_flush = (atoi(cp) == 0); else if ((fstat(fileno(stdout), &st) == 0) && S_ISREG(st.st_mode)) ...
false
false
false
false
false
0
new_socket_client (SoupSocket *sock) { SoupSocketPrivate *priv = SOUP_SOCKET_GET_PRIVATE (sock); GSocketClient *client = g_socket_client_new (); g_signal_connect (client, "event", G_CALLBACK (re_emit_socket_client_event), sock); if (priv->proxy_resolver) { g_socket_client_set_proxy_resolver (client, priv->p...
false
false
false
false
false
0
add_in_slow(int r, int c, int rr, int cc, NODE * zero, int *node_ct) { int dor, doc; bseg_put(&bseen, &on, rr, cc); if (rr < minr) minr = rr; if (rr > maxr) maxr = rr; if (cc < minc) minc = cc; if (cc > maxc) maxc = cc; if (*node_ct == array_size) { zero = (NODE *) G_realloc(zero, (arr...
false
false
false
false
false
0
ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev) { if (!dev || dev->fd < 0) return; /* close the fd */ close(dev->fd); /* remove the element from the list */ _ecore_fb_li_devices = eina_list_remove(_ecore_fb_li_devices, dev); free(dev); }
false
false
false
false
false
0
EqualIPs(const SocketAddress& addr) const { return (ip_ == addr.ip_) && ((!IPIsAny(ip_)) || (hostname_ == addr.hostname_)); }
false
false
false
false
false
0
find_exact_renames(struct diff_options *options) { int i; struct hash_table file_table; init_hash(&file_table); for (i = 0; i < rename_src_nr; i++) insert_file_table(&file_table, -1, i, rename_src[i].p->one); for (i = 0; i < rename_dst_nr; i++) insert_file_table(&file_table, 1, i, rename_dst[i].two); /* Fi...
false
false
false
false
false
0
pm_qos_latency_tolerance_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) { s32 value; int ret; if (kstrtos32(buf, 0, &value)) { if (!strcmp(buf, "auto") || !strcmp(buf, "auto\n")) value = PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT; else if (!strcmp(buf, "...
false
false
false
false
false
0
execute( MapDisplayInterface* md ) { int cnt = 0; MemoryStream stream ( &buf, tnstream::reading ); while ( cnt < objectNum ) { Type type = Type(stream.readInt()); if ( type == ReinfVehicle ) { try { Vehicle* veh = Vehicle::newFromStream( gamemap, stream, gamemap->idManager.getN...
false
false
false
false
false
0
xml_to_flag_rule(xnode_t *xn, void *data) { enum rule_flag_action stable = RULE_FLAG_IGNORE; enum rule_flag_action busy = RULE_FLAG_IGNORE; enum rule_flag_action push = RULE_FLAG_IGNORE; const char *buf; rule_t *rule; filter_t *target, *filter = data; guint16 flags; guint64 v; int erro...
false
false
false
false
false
0
STRING_new(const char *src, int len) { STRING *str; char *data; if (len == 0) return NULL; //ALLOC(&str, REAL_SIZE(len + 1 + sizeof(STRING)), "STRING_new"); str = alloc_string(len); data = str->data; if (src) memcpy(data, src, len); data[len] = 0; #ifdef DEBUG_ME DEBUG_where(); fprintf(stderr, "STRI...
false
false
false
true
false
1
validateField(EdiRec *rec, MdbTable *table, MdbCol *col, cchar *value) { EdiValidation *vp; cchar *error; int next; bool pass; mprAssert(rec); pass = 1; if (col->validations) { for (ITERATE_ITEMS(col->validations, vp, next)) { if ((err...
false
false
false
false
false
0
DBFIsAttributeNULL( DBFHandle psDBF, int iRecord, int iField ) { const char *pszValue; pszValue = DBFReadStringAttribute( psDBF, iRecord, iField ); if( pszValue == NULL ) return TRUE; switch(psDBF->pachFieldType[iField]) { case 'N': case 'F': /* NULL numeric fields ha...
false
false
false
false
false
0
HPDF_FileStream_FreeFunc (HPDF_Stream stream) { HPDF_FILEP fp; HPDF_PTRACE((" HPDF_FileStream_FreeFunc\n")); fp = (HPDF_FILEP)stream->attr; if (fp) HPDF_FCLOSE(fp); stream->attr = NULL; }
false
false
false
false
false
0
mgmt_read_local_oob_data(int index) { struct mgmt_hdr hdr; DBG("hci%d", index); hdr.opcode = htobs(MGMT_OP_READ_LOCAL_OOB_DATA); hdr.len = 0; hdr.index = htobs(index); if (write(mgmt_sock, &hdr, sizeof(hdr)) < 0) return -errno; return 0; }
false
false
false
false
false
0
set_compression(const char *fname) { const struct suffix_tree *node; const char *s; char ltr; if (!do_compression) return; if (!match_list) init_set_compression(); compression_level = per_file_default_level; if (!*match_list && !suftree) return; if ((s = strrchr(fname, '/')) != NULL) fname = s + 1;...
false
false
false
false
false
0
LookupTag(const string &Message,const char *Tag,const char *Default) { // Look for a matching tag. int Length = strlen(Tag); for (string::const_iterator I = Message.begin(); I + Length < Message.end(); ++I) { // Found the tag if (I[Length] == ':' && stringcasecmp(I,I+Length,Tag) == 0) { ...
false
false
false
false
false
0
replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) { listNode *ln; listIter li; int outc = 0, j; robj **outv; /* We need 1+(ARGS*3) objects since commands are using the new protocol * and we one 1 object for the first "*<count>\r\n" multibulk count, then * for every add...
false
false
false
false
false
0
brcms_c_switch_shortslot(struct brcms_c_info *wlc, bool shortslot) { /* use the override if it is set */ if (wlc->shortslot_override != BRCMS_SHORTSLOT_AUTO) shortslot = (wlc->shortslot_override == BRCMS_SHORTSLOT_ON); if (wlc->shortslot == shortslot) return; wlc->shortslot = shortslot; brcms_b_set_shortslo...
false
false
false
false
false
0
dir_s_glob(int argc, VALUE *argv, VALUE obj) { VALUE str, rflags, ary; int flags; if (rb_scan_args(argc, argv, "11", &str, &rflags) == 2) flags = NUM2INT(rflags); else flags = 0; ary = rb_check_array_type(str); if (NIL_P(ary)) { ary = rb_push_glob(str, flags); } else { volatile VAL...
false
false
false
false
false
0
test_refs_reflog_drop__dropping_a_non_exisiting_entry_from_the_log_returns_ENOTFOUND(void) { cl_assert_equal_i(GIT_ENOTFOUND, git_reflog_drop(g_reflog, entrycount, 0)); cl_assert_equal_sz(entrycount, git_reflog_entrycount(g_reflog)); }
false
false
false
false
false
0
routerset_parse(routerset_t *target, const char *s, const char *description) { int r = 0; int added_countries = 0; char *countryname; smartlist_t *list = smartlist_new(); smartlist_split_string(list, s, ",", SPLIT_SKIP_SPACE | SPLIT_IGNORE_BLANK, 0); SMARTLIST_FOREACH_BEGIN(list, ch...
false
false
false
false
false
0
getElementValue(char *pline) { int len; while ( isspace((int) *pline) ) pline++; len = strlen(pline); while ( isspace((int) *(pline+len-1)) && len ) { *(pline+len-1) = 0; len--;} return (pline); }
false
false
false
false
true
1
qlt_81xx_config_nvram_stage1(struct scsi_qla_host *vha, struct nvram_81xx *nv) { struct qla_hw_data *ha = vha->hw; if (!QLA_TGT_MODE_ENABLED()) return; if (qla_tgt_mode_enabled(vha)) { if (!ha->tgt.saved_set) { /* We save only once */ ha->tgt.saved_exchange_count = nv->exchange_count; ha->tgt.saved_fi...
false
false
false
false
false
0
astnode_create(astnode_type type, location loc) { extern const char *yy_current_filename(); if (loc.file == NULL) { loc.file = yy_current_filename(); } astnode *n = (astnode *)malloc(sizeof(astnode)); if (n != NULL) { n->type = type; n->loc = loc; n->flags = 0; ...
false
false
false
false
false
0
party_send_message(struct map_session_data *sd, const char *mes, size_t len) { if(sd->status.party_id==0) return; intif_party_message(sd->status.party_id,sd->status.account_id,mes,len); return; }
false
false
false
false
false
0
runOnModule(Module &M) { this->M = &M; Ctx = &M.getContext(); FnMap.clear(); for (Function &F : M) { if (DISubprogram *SP = F.getSubprogram()) FnMap[SP] = &F; } if (Options.EmitNotes) emitProfileNotes(); if (Options.EmitData) return emitProfileArcs(); return false; }
false
false
false
false
false
0
Clear() { this->str(std::string()); m_text = this->str(); }
false
false
false
false
false
0
operator<<(std::ostream& out, const ComputingServiceAttributes& cs) { if (!cs.Name.empty()) out << IString("Name: %s", cs.Name) << '\n'; if (!cs.ID.empty()) out << IString("ID: %s", cs.ID) << '\n'; if (!cs.Type.empty()) out << IString("Type: %s", cs.Type) << '\n'; return out; }
false
false
false
false
false
0
make_space(struct config_group *g, const char *name) { struct dlm_space *sp = NULL; struct dlm_nodes *nds = NULL; void *gps = NULL; sp = kzalloc(sizeof(struct dlm_space), GFP_NOFS); gps = kcalloc(2, sizeof(struct config_group *), GFP_NOFS); nds = kzalloc(sizeof(struct dlm_nodes), GFP_NOFS); if (!sp || !gps || ...
false
false
false
false
false
0
__quota_reconfigure (xlator_t *this, inode_table_t *itable, limits_t *limit) { inode_t *inode = NULL; if ((this == NULL) || (itable == NULL) || (limit == NULL)) { goto out; } if (!uuid_is_null (limit->gfid)) { inode = inode_find (itable, limit->gfid); ...
false
false
false
false
false
0
QRinput_Struct_appendInput(QRinput_Struct *s, QRinput *input) { QRinput_InputList *e; if(input->mqr) { errno = EINVAL; return -1; } e = QRinput_InputList_newEntry(input); if(e == NULL) return -1; s->size++; if(s->tail == NULL) { s->head = e; s->tail = e; } else { s->tail->next = e; s->tail = e; ...
false
false
false
false
false
0
dict_traverse(PyObject *op, visitproc visit, void *arg) { Py_ssize_t i, n; PyDictObject *mp = (PyDictObject *)op; if (mp->ma_keys->dk_lookup == lookdict) { for (i = 0; i < DK_SIZE(mp->ma_keys); i++) { if (mp->ma_keys->dk_entries[i].me_value != NULL) { Py_VISIT(mp->ma_keys...
false
false
false
false
false
0
_ecore_thread_worker_free(Ecore_Pthread_Worker *worker) { LKD(worker->cancel_mutex); CDD(worker->cond); LKD(worker->mutex); if (_ecore_thread_worker_count > ((_ecore_thread_count_max + 1) * 16)) { _ecore_thread_worker_count--; free(worker); return; } eina_trash_push(&_...
false
false
false
false
false
0
hook_del_event(const char *name) { hook_t *h; if ((h = find_hook(name)) != NULL) { mowgli_node_t *n, *tn; MOWGLI_ITER_FOREACH_SAFE(n, tn, h->hooks.head) { mowgli_node_delete(n, &h->hooks); mowgli_node_free(n); } mowgli_heap_free(hook_heap, h); return; } }
false
false
false
false
false
0
ilist_insert_up(Ilist p, int i) { if (p == NULL || p->i >= i) { Ilist g = get_ilist(); g->i = i; g->next = p; return g; } else { p->next = ilist_insert_up(p->next, i); return p; } }
false
false
false
false
false
0
sp_truncate_helper (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset) { uint64_t value = 0; sp_inode_ctx_t *inode_ctx = NULL; int32_t ret = 0, op_ret = -1, op_errno = EINVAL; GF_ASSERT (frame); GF_VALIDATE_OR_GOTO (frame-...
false
false
false
true
false
1
Cmd_Score_f (edict_t *ent) { ent->client->showinventory = false; ent->client->showhelp = false; if (!deathmatch->value && !coop->value) return; if (ent->client->showscores) { ent->client->showscores = false; return; } ent->client->showscores = true; DeathmatchScoreboard (ent); }
false
false
false
false
false
0
Load(const char *filename, bool toDisplayFormat, u32 cKey) { surface = IMG_Load(filename); if (surface != 0) { if (toDisplayFormat) { SDL_Surface *surf = SDL_DisplayFormat(surface); if (0 != surf) { SDL_FreeSurface(surface); surface = surf; ColorKey(cKey); ...
false
false
false
false
false
0
rb_str_length(VALUE str) { long len; len = str_strlen(str, STR_ENC_GET(str)); return LONG2NUM(len); }
false
false
false
false
false
0
cattr_fix_arch(change_identifier &cid) { cstate_ty *cstate_data; cattr_ty *cattr_data; string_ty *un; size_t j; pconf_ty *pconf_data; // // Extract current change attributes. // cstate_data = cid.get_cp()->cstate_get(); cattr_data = (cattr_ty *)catt...
false
false
false
false
false
0
track_has_time(const route_head* header) { queue* elem, *tmp; int points_with_time = 0; QUEUE_FOR_EACH(&header->waypoint_list, elem, tmp) { waypoint* tpt = (waypoint*)elem; if (tpt->creation_time) { points_with_time++; if (points_with_time >= 2) { return 1; } } } return ...
false
false
false
false
false
0
ENGINE_get_pkey_asn1_meth_str(ENGINE *e, const char *str, int len) { int i, nidcount; const int *nids; EVP_PKEY_ASN1_METHOD *ameth; if (!e->pkey_asn1_meths) return NULL; if (len == -1) len = strlen(str); nidcount = e->pkey_asn1_meths(e, NULL, &nids, 0); for (i = 0; i < nidcount; i++) { e->pkey_asn1...
false
false
false
false
false
0
additionalFaces(JohnsonBodyPart j,uint32_t numBaseEdges) { if (j==INF_NO_BODY||j==SUP_NO_BODY) return 1; //j is a base else if (j<UPWARDS_CUPOLA) return numBaseEdges; //j is a pyramid else if (j<PRISM) return numBaseEdges+ ((numBaseEdges>=6)?1:0); //j is a cupola else if (j==PRISM) return numBaseEdges; else if (j=...
false
false
false
false
false
0
removeFromNodeHash(KDirModelNode* node, const KUrl& url) { if (node->item().isDir()) { KUrl::List urls; static_cast<KDirModelDirNode *>(node)->collectAllChildUrls(urls); Q_FOREACH(const KUrl& u, urls) { m_nodeHash.remove(u); } } m_nodeHash.remove(cleanupUrl(url));...
false
false
false
false
false
0
get_alias_flag_cb (TpConnection *self, TpConnectionAliasFlags flags, const GError *error, gpointer user_data, GObject *weak_object) { GSimpleAsyncResult *result = user_data; if (error != NULL) { DEBUG ("Failed to get AliasFlag : %s", error->message); g_simple_async_result_set_from_e...
false
false
false
false
false
0
cb_range_contained_collect (DependencyRange const *deprange, G_GNUC_UNUSED gpointer ignored, CollectClosure *user) { GnmRange const *range = &deprange->range; if (range_overlap (user->target, range)) micro_hash_foreach_dep (deprange->deps, dep, { if (!(dep->flags & (DEPENDENT_FLAGGED | DEPENDENT_C...
false
false
false
false
false
0
AddMenuItem(QActionGroup* group, const QString& text, Mode mode, Mode iconMode) { QAction* action = group->addAction(text); action->setCheckable(true); action->setData(mode); connect(action, SIGNAL(triggered()), this, SLOT(SetMode())); if (mode == mode_ || iconMode==mode_) { action->setChecked(true); }...
false
false
false
false
false
0
PS_generate_sine(ParaSparse *M, int *N, MPI_Comm comm) { int i,j,n; *M = PS_DEFAULT; M->N = *N; M->comm = comm; MPI_Comm_size(M->comm, &(M->size)); MPI_Comm_rank(M->comm, &(M->rank)); M->na = (M->rank) * (*N/(M->size)); if(M->rank == M->size-1) M->nd = *N - M->na; else M->nd = ((M->rank)+1)*(*N/(M->s...
false
false
false
false
false
0
server_inodelk (rpcsvc_request_t *req) { server_state_t *state = NULL; call_frame_t *frame = NULL; gfs3_inodelk_req args = {{0,},}; int cmd = 0; int ret ...
false
true
false
false
false
1
wxt_cairo_create_platform_context() { int width, height; cairo_surface_t *surface; FPRINTF((stderr,"wxt_cairo_create_context\n")); if (data32) delete[] data32; width = plot.device_xmax; height = plot.device_ymax; if (width<1||height<1) return 1; data32 = new unsigned int[width*height]; surface = cair...
false
false
false
false
false
0
hwloc_topology_export_xml(hwloc_topology_t topology, const char *filename) { hwloc_localeswitch_declare; char *env; int force_nolibxml; int ret; if (!hwloc_libxml_callbacks && !hwloc_nolibxml_callbacks) { errno = ENOSYS; return -1; } hwloc_localeswitch_init(); env = getenv("HWLOC_NO_LIBXML_EX...
false
false
false
false
true
1
get_label(void) { int i; for (i=0;i<lindex;i++) { if (!strcasecmp(token,labels[i])) return(offsets[i]); } printf("Warning: label '%s' does not exist.\n",token); if (token[0]=='L') sscanf(token,"L%x",&word); else sscanf(token,"%x",&word); return(word); }
false
false
false
false
false
0
Copy(char *start, int bytes) { //std::cerr << "eback=" << m_chunk_buffer - eback() // << "gptr=" << gptr() -m_chunk_buffer // << "egptr=" << egptr() - m_chunk_buffer << endl; int bytes_left = m_buffer_size - (egptr() - m_chunk_buffer); if (bytes_left < bytes) { char *t...
false
false
false
false
false
0
__tg3_set_rx_mode(struct net_device *dev) { struct tg3 *tp = netdev_priv(dev); u32 rx_mode; rx_mode = tp->rx_mode & ~(RX_MODE_PROMISC | RX_MODE_KEEP_VLAN_TAG); #if !defined(CONFIG_VLAN_8021Q) && !defined(CONFIG_VLAN_8021Q_MODULE) /* When ASF is in use, we always keep the RX_MODE_KEEP_VLAN_TAG * flag clear...
false
false
false
false
false
0
iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, struct iwl_rxon_context *ctx) { enum ieee80211_band band = ch->band; u16 channel = ch->hw_value; if ((le16_to_cpu(ctx->staging.channel) == channel) && (priv->band == band)) return; ctx->staging.channel = cpu_to_le16(channel); if...
false
false
false
false
false
0
gw_notebook_search_option_search_type_click ( GtkToggleButton *chk, gpointer search_type) { gint result = -1; #ifdef GW_DEBUG_GUI_CALLBACK_COMPONENT g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); #endif if ( chk != NULL) { gw_am_set_settings ( GW_VALUE_APP_SEARCH_TYPE, g_strd...
false
false
false
false
false
0
reset_timeout (void) { if (this->qtime_ != 0) { delete this->qtime_; this->qtime_ = 0; } ACE_Time_Value *max_wait_time = this->timer_queue_->calculate_timeout (0) ; if (max_wait_time) { ACE_NEW (this->qtime_, QTimer); QObject::connect (qtime_, ...
false
false
false
false
false
0
singleDraw(int n1, int n2, int m1, double psi, int mode, double const *pi, int N, double ran) { if (mode == 0) return sampleLowToHigh(0, ran, pi, N); if (mode == N - 1) return sampleHighToLow(N - 1, ran, pi, N); if (ran < pi[mode]) return mode; ran -= pi[mode]; int lower = mode - 1...
false
false
false
false
false
0
evas_object_smart_data_get(const Evas_Object *obj) { Evas_Object_Smart *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Smart *)(obj->object_data); if (!o) return NULL; if (o->magic != MAGIC_OBJ_SMART) return NULL; return o->data; }
false
false
false
false
false
0
EmitGS(ostream& out, Clipboard* cb, boolean prevout) { prevout = OverlayScript::EmitGS(out, cb, prevout); Iterator i; for (First(i); !Done(i); Next(i)) { prevout = GetScript(i)->EmitGS(out, cb, prevout); } return prevout; }
false
false
false
false
false
0
get_node(int i) { if (i <= 0) return 0; void *Node = get_root(); return get_node_r(Node, &i); }
false
false
false
false
false
0
output_default(llist *l) { const lnode *n; list_last(l); n = list_get_cur(l); printf("----\ntime->%s", ctime(&l->e.sec)); if (!n) { fprintf(stderr, "Error - no elements in record."); return; } if (n->type >= AUDIT_DAEMON_START && n->type < AUDIT_SYSCALL) printf("%s\n", n->message); else { do { prin...
false
false
false
false
false
0
bind_use_rule(struct cfg_t *cfgp, struct cfglib_t *cntxt_lbp, struct cell_t *cp, struct cfgrule_t *rulp) { struct cfg_t *use_replace_cfgp; struct cfglib_t *lbp; struct mod_t *bind_mdp; struct sy_t *msyp; /* if use clause heirarchical config form find the config to use */ if (rulp->use_rule_cfg) { if ((use...
false
false
false
false
false
0
C_SignUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ULONG ulPartLen) { INIT_CONTEXT(); st_logf("SignUpdate\n"); VERIFY_SESSION_HANDLE(hSession, NULL); return CKR_FUNCTION_NOT_SUPPORTED; }
false
false
false
false
false
0
get_history(char **cmd, void *item, int *free_ret) { char *start, *text, *ret; /* get variable name */ start = ++(*cmd); while (**cmd != '\0' && **cmd != '!') (*cmd)++; if (history_func == NULL) ret = NULL; else { text = g_strndup(start, (int) (*cmd-start)); ret = history_func(text, item, free_ret); g_f...
false
false
false
false
false
0
_dxfFieldInterpolator_Interpolate(FieldInterpolator fi, int *n, float **points, Pointer *values, Interpolator *hint, int fuzzFlag) { int i, j; int nStart; float *p, xpoints[MAX_DIM]; CHECK(fi, CLASS_INTERPOLATOR); if (hint) *hint = NULL; if (fi->xflag) { p = xpoints; for (i = ...
false
false
false
false
true
1
toutf8(string s) { string u; char *p=libmail_u_convert_toutf8(s.c_str(), unicode_default_chset(), NULL); try { u=p; free(p); } catch (...) { free(p); LIBMAIL_THROW(LIBMAIL_THROW_EMPTY); } return u; }
false
false
false
false
false
0
write_priors_DS(priors_DS priors, int n_prior, FILE *stream) { char caller[] = "write_priors_DS"; safe_fprintf(stream, caller, "priors_DS %d\n", n_prior); if (priors != NULL) { safe_fprintf(stream, caller, "known_prior, sigma_min, sigma_max\n"); safe_fprintf(stream, caller, "%.7e %.7e %.7e\n", ...
false
false
false
false
false
0
load_arg_defines(struct prog_info *pi) { int i; char *expr; char buff[256]; struct data_list *define; for(define = GET_ARG(pi->args, ARG_DEFINE); define; define = define->next) { strcpy(buff, define->data); expr = get_next_token( buff, TERM_EQUAL); if(expr) { // we reach this, when there is act...
true
true
false
false
true
1
main(int argc,char *argv[]) { char *name = NULL; char *nxt_name; unsigned char bt_addr[6]; unsigned int bt_strength,free_flash; int c,firmmaj,firmmin,protomaj,protomin,battery,devinfo,ver,volume; while ((c = getopt(argc,argv,":hn:"))!=-1) { switch(c) { case 'h': usage(argv[0],0); ...
false
false
false
false
false
0
GetType( const DDSHeader & header ) { if( header.pf.flags & DDPF_RGB ) { if( header.pf.flags & DDPF_ALPHAPIXELS ) { switch( header.pf.bitcount ) { case 16: return (header.pf.amask == 0x8000) ? DDS_A1R5G5B5 : DDS_A4R4G4B4; case 32: return DD...
false
false
false
false
false
0
on_cgi_data(struct ns_connection *nc) { struct connection *conn = (struct connection *) nc->user_data; const char *status = "500"; struct mg_connection c; if (!conn) return; // Copy CGI data from CGI socket to the client send buffer ns_forward(nc, conn->ns_conn); // If reply has not been parsed yet, pa...
false
false
false
false
false
0
test(char *URL) { CURL* curls = NULL; CURLM* multi = NULL; int still_running; int i = -1; int res = 0; CURLMsg *msg; start_test_timing(); global_init(CURL_GLOBAL_ALL); multi_init(multi); easy_init(curls); easy_setopt(curls, CURLOPT_URL, URL); easy_setopt(curls, CURLOPT_HEADER, 1L); multi...
false
false
false
false
false
0
track_scheduled_insns_and_blocks (rtx insn) { /* Even if this insn can be a copy that will be removed during current move_op, we still need to count it as an originator. */ bitmap_set_bit (current_originators, INSN_UID (insn)); if (!bitmap_clear_bit (current_copies, INSN_UID (insn))) { /* Note th...
false
false
false
false
false
0
libmacaddr_anonymize(ipv6calc_macaddr *macaddrp, const s_ipv6calc_anon_set *ipv6calc_anon_set_p) { int mask = 0, i, j; uint8_t bit_ul = 0; /* anonymize MAC address according to settings */ DEBUGPRINT_WA(DEBUG_libmac, "called: EUI-48=%06x%06x method=%d", EUI48_00_23(macaddrp->addr), EUI48_24_47(macaddrp->addr), ipv...
false
false
false
false
false
0
copy_directory(string src, string dst) { struct stat config_stat; struct dirent *entry; if(src.substr(src.length()-1,1) != "/") src += "/"; if(dst.substr(dst.length()-1,1) != "/") dst += "/"; if(!Utils::Io::create_directory(dst)) return 0; if(Utils::Io::check_directory(src)) { DIR *di...
false
false
false
false
false
0
xaccQueryAddNumericMatch (QofQuery *q, gnc_numeric amount, QofNumericMatch sign, QofQueryCompare how, QofQueryOp op, const char * path, ...) { QofQueryPredData *pred_data; GSList *param_list; va_list ap; if (!q || !path) return; pred_data...
false
false
false
false
false
0
epoint2_copy(epoint *a,epoint *b) { if (a==b) return; copy(a->X,b->X); copy(a->Y,b->Y); #ifndef MR_AFFINE_ONLY if (a->marker==MR_EPOINT_GENERAL) copy(a->Z,b->Z); #endif b->marker=a->marker; return; }
false
false
false
false
false
0
is_command_allowed_in_ps(u16 cmd) { switch (cmd) { case CMD_802_11_RSSI: return 1; case CMD_802_11_HOST_SLEEP_CFG: return 1; default: break; } return 0; }
false
false
false
false
false
0
gf_w64_composite_multiply_region(gf_t *gf, void *src, void *dest, gf_val_64_t val, int bytes, int xor) { gf_internal_t *h = (gf_internal_t *) gf->scratch; gf_t *base_gf = h->base_gf; uint32_t b0 = val & 0x00000000ffffffff; uint32_t b1 = (val & 0xffffffff00000000) >> 32; uint64_t *s64, *d64; uint64_t *top; ...
false
false
false
false
false
0
snic_show_link_state(struct device *dev, struct device_attribute *attr, char *buf) { struct snic *snic = shost_priv(class_to_shost(dev)); if (snic->config.xpt_type == SNIC_DAS) snic->link_status = svnic_dev_link_status(snic->vdev); return snprintf(buf, PAGE_SIZE, "%s\n", (snic->link_status) ? "L...
false
false
false
false
false
0
print_dirfd(const char *val) { char *out; if (strcmp(val, "-100") == 0) { if (asprintf(&out, "AT_FDCWD") < 0) out = NULL; } else { if (asprintf(&out, "0x%s", val) < 0) out = NULL; } return out; }
false
false
false
false
false
0
gdome_xmlSetOldNs (xmlDoc *doc, xmlNs *ns) { /* xmlNs *cur; */ if (doc == NULL) return; if (doc->oldNs == NULL) { /* * Allocate a new Namespace and fill the fields. */ doc->oldNs = (xmlNsPtr) xmlMalloc(sizeof(xmlNs)); if (doc->oldNs == NULL) { xmlGenericError(xmlGenericErrorContext, "xml...
false
false
false
false
false
0
might_be_RSA(RSA *rsa, proc_t *proc) { return rsa->pad || rsa->version || (rsa->references < 0) || (rsa->references > 0xff) || is_valid_address( (unsigned long) rsa->n, proc) || is_valid_address( (unsigned long) rsa->e, proc) || is_valid_address( (unsigned long) rsa->d, proc) ||...
false
false
false
false
false
0
opSetStrokeGray(Object args[], int numArgs) { GfxColor color; GfxColorSpace *colorSpace = NULL; Object obj; state->setStrokePattern(NULL); res->lookupColorSpace("DefaultGray", &obj); if (!obj.isNull()) { colorSpace = GfxColorSpace::parse(&obj, out); } if (colorSpace == NULL) { colorSpace = new ...
false
false
false
false
false
0
mdbAddColumn(Edi *edi, cchar *tableName, cchar *columnName, int type, int flags) { Mdb *mdb; MdbTable *table; MdbCol *col; mprAssert(edi); mprAssert(tableName && *tableName); mprAssert(columnName && *columnName); mprAssert(type); mdb = (Mdb*) edi; lock(mdb); if ...
false
false
false
false
false
0
_rl_vi_append_forward (key) int key; { int point; if (rl_point < rl_end) { if (MB_CUR_MAX == 1 || rl_byte_oriented) rl_point++; else { point = rl_point; #if 0 rl_forward_char (1, key); #else rl_point = _rl_forward_char_internal (1); #endif if (point == rl_point) rl_point = r...
false
false
false
false
false
0
import_init(PyInterpreterState *interp, PyObject *sysmod) { PyObject *importlib; PyObject *impmod; PyObject *sys_modules; PyObject *value; /* Import _importlib through its frozen version, _frozen_importlib. */ if (PyImport_ImportFrozenModule("_frozen_importlib") <= 0) { Py_FatalError("P...
false
false
false
true
false
1
srp_map_finish_fmr(struct srp_map_state *state, struct srp_rdma_ch *ch) { struct srp_target_port *target = ch->target; struct srp_device *dev = target->srp_host->srp_dev; struct ib_pool_fmr *fmr; u64 io_addr = 0; if (state->fmr.next >= state->fmr.end) return -ENOMEM; WARN_ON_ONCE(!dev->use_fmr); if...
false
false
false
false
false
0
DBTableFieldIsSimple (const DBObject *obj) { DBObjTableField *tableField = (DBObjTableField *) obj; return ((tableField->Type () == DBTableFieldInt) || (tableField->Type () == DBTableFieldString) || (tableField->Type () == DBTableFieldFloat) ? true : false); }
false
false
false
false
false
0
gnm_expr_top_transpose (GnmExprTop const *texpr) { g_return_val_if_fail (IS_GNM_EXPR_TOP (texpr), NULL); switch (GNM_EXPR_GET_OPER (texpr->expr)) { case GNM_EXPR_OP_ARRAY_CORNER: /* Transpose size */ return gnm_expr_top_new_array_corner (texpr->expr->array_corner.rows, texpr->expr->array_corner.cols, ...
false
false
false
false
false
0
pickOnlyChoice() { if (CheckPending) releasePending(); if (CurrMOps > 0) { // Defer any ready instrs that now have a hazard. for (ReadyQueue::iterator I = Available.begin(); I != Available.end();) { if (checkHazard(*I)) { Pending.push(*I); I = Available.remove(I); continue...
false
false
false
false
false
0