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
valid_plugin_uid(plugin_t *plugin, const char *uid) { int valid = 0; char *tmp; if (!plugin) { debug_error("valid_plugin_uid() no plugin passed. In current api, it means than something really bad happen.\n"); return -1; } tmp = xstrdup(uid); query_emit_id(plugin, PROTOCOL_VALIDATE_UID, &tmp, &valid); xfre...
false
false
false
false
false
0
createPart( ModelPart * modelPart, ViewLayer::ViewLayerPlacement viewLayerPlacement, ViewLayer::ViewID viewID, const ViewGeometry & viewGeometry, long id, QMenu * itemMenu, QMenu * wireMenu, bool doLabel) { modelPart->setModelIndexFromMultiplied(id); // make sure the model index is synched with the id; this is not a...
false
false
false
false
false
0
get_S_dtp_list(int target_proc, int target_mt, int array_entry, DtScheInfo *dt_sche) { int i, bmax, pred_num, count; Array_def_use_table_semnode *S; IntSet pred; Module_table *mpt; List *ret = NULL; pred = dt_sche->array_pred[target_mt][array_entry];...
false
false
false
false
false
0
constructOutputContent(const Core::PatientDataExporterJob &job, const QList<FormExportation> &formExports) { // Join all css style sheets QString html; QString css; foreach(const FormExportation &exp, formExports) css += exp.css.join("\n"); if (job.exportGroupment...
false
false
false
false
false
0
serviceRequests(DUL_NETWORKKEY ** network, DUL_ASSOCIATIONKEY ** association, DUL_ASSOCIATESERVICEPARAMETERS * service) { CONDITION cond; DUL_PRESENTATIONCONTEXT * ctx; DUL_PRESENTATIONCONTEXTID ctxID; void *message; MSG_TYPE messageType; CTNBOOLEAN networkLink = TRUE; cond...
false
false
false
false
false
0
phantom_exit(void) { pci_unregister_driver(&phantom_pci_driver); unregister_chrdev_region(MKDEV(phantom_major, 0), PHANTOM_MAX_MINORS); class_remove_file(phantom_class, &class_attr_version.attr); class_destroy(phantom_class); pr_debug("phantom: module successfully removed\n"); }
false
false
false
false
false
0
test_dump_memory_data (const char* name, const char* filename) { dc_context_t *context = NULL; dc_device_t *device = NULL; dc_context_new (&context); dc_context_set_loglevel (context, DC_LOGLEVEL_ALL); dc_context_set_logfunc (context, logfunc, NULL); message ("reefnet_sensusultra_device_open\n"); dc_status_t r...
true
true
false
false
true
1
bl(C *s){for(;*s&&!issp(*s);++s);R s;}
false
false
false
false
false
0
_midgard_query_select_add_join (MidgardQueryExecutor *self, const gchar *join_type, MidgardQueryProperty *left_property, MidgardQueryProperty *right_property) { g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (join_type != NULL, FALSE); g_return_val_if_fail (left_property != NULL, FALSE); g_retu...
false
false
false
false
true
1
claws_mailmbox_folder_free(struct claws_mailmbox_folder * folder) { unsigned int i; for(i = 0 ; i < carray_count(folder->mb_tab) ; i++) { struct claws_mailmbox_msg_info * info; info = carray_get(folder->mb_tab, i); if (info != NULL) claws_mailmbox_msg_info_free(info); } carray_free(folder->...
false
false
false
false
false
0
grib1GetLevel(grib_handle *gh, int *leveltype, int *lbounds, int *level1, int *level2) { int status; long lpar; double dlevel; *leveltype = 0; *lbounds = 0; *level1 = 0; *level2 = 0; status = grib_get_long(gh, "indicatorOfTypeOfLevel", &lpar); if ( status == 0 ) { *leveltype = (int) lpar...
false
false
false
false
false
0
cray_quad_GetColorAt(int sel, Geom *geom, va_list *args) { ColorA *color; int vindex, findex; color = va_arg(*args, ColorA *); vindex = va_arg(*args, int); findex = va_arg(*args, int); if (!crayHasVColor(geom, NULL)) return 0; if (vindex != -1) return (void *)(long)crayGetColorAtV(geom, color, vinde...
false
false
false
false
false
0
frag_alloc_check (const struct obstack *ob) { if (ob->chunk_size == 0) { as_bad (_("attempt to allocate data in absolute section")); subseg_set (text_section, 0); } if (mri_common_symbol != NULL) { as_bad (_("attempt to allocate data in common section")); mri_common_symbol = NUL...
false
false
false
false
false
0
RecordTypeFeedback(TypeFeedbackOracle* oracle) { Property* property = expression()->AsProperty(); ASSERT(property != NULL); // Specialize for the receiver types seen at runtime. Literal* key = property->key()->AsLiteral(); ASSERT(key != NULL && key->handle()->IsString()); Handle<String> name = Handle<String...
false
false
false
false
false
0
make_proxy_line(char *buf, int buf_len, struct server *srv, struct connection *remote) { int ret = 0; if (srv && (srv->pp_opts & SRV_PP_V2)) { ret = make_proxy_line_v2(buf, buf_len, srv, remote); } else { if (remote) ret = make_proxy_line_v1(buf, buf_len, &remote->addr.from, &remote->addr.to); else ret...
false
false
false
false
false
0
isl_args_parse(struct isl_args *args, int argc, char **argv, void *opt, unsigned flags) { int a = -1; int skip = 0; int i; int n; struct isl_prefixes prefixes = { 0 }; n = n_arg(args->args); for (i = 1; i < argc; ++i) { if ((strcmp(argv[i], "--version") == 0 || strcmp(argv[i], "-V") == 0) && any_vers...
false
false
false
false
false
0
EliminateMostlyEmptyBlock(BasicBlock *BB) { BranchInst *BI = cast<BranchInst>(BB->getTerminator()); BasicBlock *DestBB = BI->getSuccessor(0); DEBUG(dbgs() << "MERGING MOSTLY EMPTY BLOCKS - BEFORE:\n" << *BB << *DestBB); // If the destination block has a single pred, then this is a trivial edge, // just coll...
false
false
false
false
false
0
vrp_fold_stmt (gimple_stmt_iterator *si) { if (fold_predicate_in (si)) return true; return simplify_stmt_using_ranges (si); }
false
false
false
false
false
0
reap_cpp(void) { int status; cpp_pid = 0; if (waitpid(cpp_pid,&status,0) < 0) { perror("waitpid"); exit(1); } if (!status) { if (dup2(real_stdin,0) < 0) { perror("dup2"); exit(1); } return; } if (WIFEXITED(status)) exit(WEXITSTATUS(status)); if (WIFSIGNALED(status)) fpr...
false
false
false
false
false
0
P_expset(d, s) /* d := s */ register long *d; register long s; { if (s) { d[1] = s; *d = 1; } else *d = 0; return d; }
false
false
false
false
false
0
FuncAClosVec( Obj self, Obj veclis, /* pointers to matrix vectors and their multiples */ Obj vec, /* vector we compute distance to */ Obj cnt, /* distances list */ Obj stop) /* distances list */ { Obj sum; /* sum vector */ Obj best; /* best vector */ UInt len; len = LEN_GF2VEC(vec); i...
false
false
false
false
false
0
NewFileDesc(pkgCache::DescIterator &Desc, ListParser &List) { if (CurrentFile == 0) return true; // Get a structure map_ptrloc const DescFile = AllocateInMap(sizeof(pkgCache::DescFile)); if (DescFile == 0) return false; pkgCache::DescFileIterator DF(Cache,Cache.DescFileP + DescFil...
false
false
false
false
false
0
fuse_kill_sb_blk(struct super_block *sb) { struct fuse_conn *fc = get_fuse_conn_super(sb); if (fc) { down_write(&fc->killsb); fc->sb = NULL; up_write(&fc->killsb); } kill_block_super(sb); }
false
false
false
false
false
0
_gck_attributes_commit_out (GckAttributes *attrs, CK_ULONG_PTR n_attrs) { g_return_val_if_fail (attrs != NULL, NULL); g_return_val_if_fail (n_attrs != NULL, NULL); *n_attrs = attrs->count; return (CK_ATTRIBUTE_PTR)attrs->data; }
false
false
false
false
false
0
write_all (int fd, const guchar *buf, int len) { int all = len; int res; while (len > 0) { res = write (fd, buf, len); if (res < 0) { if (errno == EAGAIN && errno == EINTR) continue; if (errno != EPIPE) g_warning ("couldn't write %u bytes to client: %s", all, g_strerror (errno)); ...
false
false
false
false
false
0
disabled_week_entry(lListElem **cal) { /* default values */ lList *wdrl = NULL, *dtrl = NULL; int state = QI_DO_DISABLE; DENTER(TOP_LAYER, "disabled_week_entry"); if (scan(NULL, NULL)==STRING && cheap_scan(get_string(), statev, 3, "state specifier")<0) { if (week_day_range_li...
false
false
false
false
true
1
set_address (EContact *contact, EContactField field, EEwsItem *item, const gchar *item_field) { const EwsAddress *address; address = e_ews_item_get_physical_address (item, item_field); if (address) { EContactAddress *addr; addr = g_new0 (EContactAddress, 1); copy_ews_ad...
false
false
false
false
false
0
local_digit_begin(struct ast_channel *ast, char digit) { struct local_pvt *p = ast_channel_tech_pvt(ast); int res = -1; struct ast_frame f = { AST_FRAME_DTMF_BEGIN, }; int isoutbound; if (!p) { return -1; } ao2_ref(p, 1); /* ref for local_queue_frame */ ao2_lock(p); isoutbound = IS_OUTBOUND(ast, p); f.sub...
false
false
false
false
false
0
huge_improbable_sha1(const char *buf, size_t len) { size_t ilen = 0; /* Length of the improbable sequence */ size_t i, longest = 0; for (i = 1; i < len; i++) { uchar previous, c; previous = buf[i - 1]; c = buf[i]; if (c == previous || (c + 1 == previous) || (c - 1 == previous)) { ilen++; } else {...
false
false
false
false
false
0
snd_at73c213_pcm_pointer(struct snd_pcm_substream *substream) { struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; snd_pcm_uframes_t pos; unsigned long bytes; bytes = ssc_readl(chip->ssc->regs, PDC_TPR) - (unsigned long)runtime->dma_addr; pos =...
false
false
false
false
false
0
ssb_pcmcia_switch_coreidx(struct ssb_bus *bus, u8 coreidx) { int err; int attempts = 0; u32 cur_core; u32 addr; u32 read_addr; u8 val; addr = (coreidx * SSB_CORE_SIZE) + SSB_ENUM_BASE; while (1) { err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS0, (addr & 0x0000F000) >> 12); if (err) ...
false
false
false
false
false
0
link_child(ARTICLE *child) { ARTICLE *art = A_PARENT(child); if (art) { art = A_CHILD1(art); if (!art || child->date < art->date) { SIBLING(child) = (ART_TREE_NODE *)art; CHILD1(A_PARENT(child)) = (ART_TREE_NODE *)child; } else { while (A_SIBLING(art) && A_SIBLING(art)->date <= child->date) ...
false
false
false
false
false
0
isArray() const { int size = fields.size(); for (int i = 0; i < size; i++) { if (! hasKey(::toString(i))) return false; } return true; }
false
false
false
false
false
0
yy_pop_parser_stack(yyParser *pParser){ YYCODETYPE yymajor; yyStackEntry *yytos; if( pParser->yyidx<0 ){ return 0; } yytos = &pParser->yystack[pParser->yyidx]; #ifndef NDEBUG if( yyTraceFILE && pParser->yyidx>=0 ){ fprintf(yyTraceFILE,"%sPopping %s\n", yyTracePrompt, yyTokenName[yytos->...
false
false
false
false
false
0
sigar_proc_stat_get(sigar_t *sigar, sigar_proc_stat_t *procstat) { int status, i; sigar_proc_list_t *pids; SIGAR_ZERO(procstat); procstat->threads = SIGAR_FIELD_NOTIMPL; if ((status = sigar_proc_list_get(sigar, NULL)) != SIGAR_OK) { return status; ...
false
false
false
false
false
0
ProcessICEMsgs(void) { FIceProcessMessagesStatus status; if (!SessionSupport) { return; } #ifdef FVWM_SM_DEBUG_PROTO fprintf(stderr,"[FVWM_SMDEBUG][ProcessICEMsgs] %i\n", (int)sm_fd); #endif if (sm_fd < 0) { return; } status = FIceProcessMessages(FSmcGetIceConnection(sm_conn), NULL, NULL); if (status ==...
false
false
false
false
false
0
fbx_SetNode(node *n,char *value_string,int is_value_string) { if(is_value_string) { node_SetString(n,value_string); } else if(!strcmp(value_string,"null")) node_SetNull(n); else if(!strcmp(value_string,"true")) node_SetBool(n,True); else if(!strcmp(valu...
false
false
false
false
false
0
distanceDown (int x, int y, int deltah) { // When deltah > 0, we want an exit sideways at the hero's level or above. // When deltah <= 0, we can go down any distance (as a last resort). int rungs = -1; int exitRung = 0; bool canGoThru = true; char objType; // If there is a way down at (x,y...
false
false
false
false
false
0
createActions() { // File m_exportAction = new Action(Icon("document-export"), tr("E&xport"), m_parentWidget, "file_export_as"); m_exportAction->setStatusTip(tr("Export image to various formats")); m_exportAction->setWhatsThis(tr("<p>Export image to various formats.</p>")); QMenu *exportMenu = new QMenu(m_parentWi...
false
false
false
false
false
0
restml_coordinates(node *p, double lengthsum, long *tipy, double *tipmax, double *x) { /* establishes coordinates of nodes */ node *q, *first, *last; if (p->tip) { p->xcoord = (long)(over * lengthsum + 0.5); p->ycoord = (*tipy); p->ymin = (*tipy); p->ymax = (*tipy); (*tipy) +=...
false
false
false
false
false
0
resize(Widget _w) #else static void resize(_w) Widget _w; #endif { XmDumbClipCallbackStruct dccs; if (XtHasCallbacks(_w, XmNresizeCallback)) { dccs.reason = XmCR_RESIZE; dccs.event = NULL; dccs.width = WIDTH(_w); dccs.height = HEIGHT(_w); XtCallCallbacks(_w, XmNresizeCallback, (X...
false
false
false
false
false
0
fill_defined_view_parts (THD *thd, TABLE_LIST *view) { char key[MAX_DBKEY_LENGTH]; uint key_length; LEX *lex= thd->lex; TABLE_LIST decoy; memcpy (&decoy, view, sizeof (TABLE_LIST)); key_length= create_table_def_key(thd, key, view, 0); if (tdc_open_view(thd, &decoy, decoy.alias, key, key_length, ...
false
false
false
false
false
0
Problem_6(vector<int> &oriStack){ if(oriStack.empty()) return; int oriLen(oriStack.size()), currLen(0); vector<int> addStack; while(currLen<oriLen){ int minVal = INT_MAX; while(oriStack.size()!=currLen){ minVal = (minVal<=oriStack.back()?minVal:oriStack.back()); addStack.push_back(oriStack....
false
false
false
false
false
0
bitset_obstack_alloc (struct obstack *bobstack, bitset_bindex n_bits, enum bitset_type type) { size_t bytes; bitset bset; bytes = bitset_bytes (type, n_bits); bset = obstack_alloc (bobstack, bytes); memset (bset, 0, bytes); return bitset_init (bset, n_bits, type); }
false
false
false
false
false
0
delete_parms(std::pair<const char*, char* const*> parms_pair) { delete[] parms_pair.first; char* const* temp_pp = parms_pair.second; for(; *temp_pp != 0; ++temp_pp) { delete[] *temp_pp; } delete[] parms_pair.second; }
false
false
false
false
false
0
AddHTTPOptions(char** papszOptions) { bMustCleanPersistant = TRUE; if (strlen(osAccessToken) > 0) papszOptions = CSLAddString(papszOptions, CPLSPrintf("HEADERS=Authorization: Bearer %s", osAccessToken.c_str())); return CSLAddString(papszOptions, CPLSPrintf("PERSISTENT=GFT...
false
false
false
false
false
0
stats_prop_klines(struct Client *source_p) { struct ConfItem *aconf; rb_dlink_node *ptr; char *user, *host, *pass, *oper_reason; RB_DLINK_FOREACH(ptr, prop_bans.head) { aconf = ptr->data; /* Skip non-klines and deactivated klines. */ if(aconf->status != CONF_KILL) continue; get_printable_kline(source...
false
false
false
false
false
0
allocateJsFile(JsFile* file,FileMode mode, FileType type) { JsVar *parent = jspNewObject(0, "File"); if (!parent) return false; // low memory file->fileVar = parent; file->data.mode = mode; file->data.type = type; file->data.state = FS_NONE; return true; }
false
false
false
false
false
0
func_iter_add_sig_links( func_iter* fi, /*!< Pointer to functional unit iterator to populate */ func_unit* funit /*!< Pointer to current functional unit */ ) { PROFILE(FUNC_ITER_ADD_SIG_LINKS); funit_link* child; /* Pointer to child functional unit */ func_unit* parent; /* Pointer to parent module of t...
false
false
false
false
false
0
__log_stat_print_pp(dbenv, flags) DB_ENV *dbenv; u_int32_t flags; { DB_THREAD_INFO *ip; ENV *env; int ret; env = dbenv->env; ENV_REQUIRES_CONFIG(env, env->lg_handle, "DB_ENV->log_stat_print", DB_INIT_LOG); if ((ret = __db_fchk(env, "DB_ENV->log_stat_print", flags, DB_STAT_ALL | DB_STAT_ALLOC | DB_S...
false
false
false
false
false
0
_status_config_sizing(Evas_Object *win, Evas_Object *naviframe) { Evas_Object *lb, *pd, *bx, *sl, *sp; bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5); LABEL_FRAME_ADD("<hilight>Scale</>")...
false
false
false
false
false
0
damage (int p, int dmg, int type, bool aimed) { if (dmg < 1) return dmg; std::vector<int> pl = internal_parts (p); pl.insert (pl.begin(), p); if (!aimed) { bool found_obs = false; for (int i = 0; i < pl.size(); i++) if (part_flag (pl[i], vpf_obstacle) && ...
false
false
false
false
false
0
ghwp_text_new (const gchar *text) { g_return_val_if_fail (text != NULL, NULL); GHWPText *ghwp_text = (GHWPText *) g_object_new (GHWP_TYPE_TEXT, NULL); ghwp_text->text = g_strdup (text); return ghwp_text; }
false
false
false
false
false
0
CreateCpxPrt( void ) { wxPanel * poPnl; if( bIsCreated( eCTLGRP_CPXPRT ) ) return; // Create the parameter (probe) complex part panel and controls #ifdef LAYOUT_MNGR poPnl = new wxPanel( this ); #else poPnl = this; // ??? #endif // LAYOUT_MNGR // Create and add simulation parameter complex part check box...
false
false
false
false
false
0
process(void) { if (channel_rep > 0 && channel_rep <= channels()) { sbuf_repp->multiply_by(gain_rep, channel_rep - 1); } else { sbuf_repp->multiply_by(gain_rep); } }
false
false
false
false
false
0
usb_serial_generic_msr_changed(struct tty_struct *tty, unsigned long arg, struct async_icount *cprev) { struct usb_serial_port *port = tty->driver_data; struct async_icount cnow; unsigned long flags; bool ret; /* * Use tty-port initialised flag to detect all hangups including the * one generated at USB-de...
false
false
false
false
false
0
histogram_selectivity(VariableStatData *vardata, FmgrInfo *opproc, Datum constval, bool varonleft, int min_hist_size, int n_skip, int *hist_size) { double result; Datum *values; int nvalues; /* check sanity of parameters */ Assert(n_skip >= 0); Assert(min_hist_size > 2 * n_skip); if ...
false
false
false
false
false
0
mono_debug_add_delegate_trampoline (gpointer code, int size) { MonoDebugDelegateTrampolineEntry *entry; if (!mono_debug_initialized) return; mono_debugger_lock (); entry = (MonoDebugDelegateTrampolineEntry *) allocate_data_item ( mono_symbol_table->global_data_table, MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE,...
false
false
false
false
false
0
dump_host_list(struct host *hosts) { struct host *this; if (!hosts) return; this = hosts; while (this) { logmsg("name %s path %s version %x proximity %u weight %u cost %u", this->name, this->path, this->version, this->proximity, this->weight, this->cost); this = this->next; } return; }
false
false
false
false
false
0
asn1PE_H245MiscellaneousCommand_type_videoFastUpdateMB (OOCTXT* pctxt, H245MiscellaneousCommand_type_videoFastUpdateMB* pvalue) { int stat = ASN_OK; ASN1BOOL extbit; /* extension bit */ extbit = 0; encodeBit (pctxt, extbit); encodeBit (pctxt, (ASN1BOOL)pvalue->m.firstGOBPresent); encodeBit (pc...
false
false
false
false
false
0
in(SPtr<TDUID> duid, SPtr<TIPv6Addr> addr) { if (isAddrRange) { if ((*addr<=*AddrL)&&(*AddrL<=*addr)) return true; if ((*addr<=*AddrR)&&(*AddrR<=*addr)) return true; if (*addr<=*AddrL) return false; if (*AddrR<=*addr) return false; } else { if (*duid<=*DUIDL) ...
false
false
false
false
false
0
fw_node_create(u32 sid, int port_count, int color) { struct fw_node *node; node = kzalloc(sizeof(*node) + port_count * sizeof(node->ports[0]), GFP_ATOMIC); if (node == NULL) return NULL; node->color = color; node->node_id = LOCAL_BUS | SELF_ID_PHY_ID(sid); node->link_on = SELF_ID_LINK_ON(sid); node-...
false
false
false
false
false
0
map_get_next_key(union bpf_attr *attr) { void __user *ukey = u64_to_ptr(attr->key); void __user *unext_key = u64_to_ptr(attr->next_key); int ufd = attr->map_fd; struct bpf_map *map; void *key, *next_key; struct fd f; int err; if (CHECK_ATTR(BPF_MAP_GET_NEXT_KEY)) return -EINVAL; f = fdget(ufd); map = __bp...
false
false
false
false
false
0
rpc_ioctl(CURL *handle, int cmd, void *clientp) { struct rpc_state *rpc = clientp; switch (cmd) { case CURLIOCMD_NOP: return CURLIOE_OK; case CURLIOCMD_RESTARTREAD: if (rpc->initial_buffer) { rpc->pos = 0; return CURLIOE_OK; } fprintf(stderr, "Unable to rewind rpc post data - try increasing http.pos...
false
false
false
false
false
0
save_CompressedTexImage1DARB(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) { GET_CURRENT_CONTEXT(ctx); if (target == GL_PROXY_TEXTURE_1D) { /* don'...
false
false
false
false
false
0
isInline() const { if (m_render) return m_render->style()->display() == khtml::INLINE; return !isElementNode(); }
false
false
false
false
false
0
gf_odf_dump_ipmp(GF_IPMP_Descriptor *ipmp, FILE *trace, u32 indent, Bool XMTDump) { u32 i, count; StartDescDump(trace, "IPMP_Descriptor", indent, XMTDump); indent++; DumpIntHex(trace, "IPMP_DescriptorID", ipmp->IPMP_DescriptorID, indent, XMTDump, 1); DumpIntHex(trace, "IPMPS_Type", ipmp->IPMPS_Type, indent, XMTDu...
false
false
false
false
false
0
namRsAttrFieldC(const AjPTable rstable, const char* str) { AjBool ret = ajFalse; AjPStr prefix = NULL; const AjPStr fields = NULL; AjPStrTok handle = NULL; AjPStr field = NULL; const AjPStr type = NULL; const AjPList fdlist = NULL; AjIList iter = NULL; const NamPAttr attr = NULL; ...
false
false
false
false
false
0
git_rerere_config(const char *var, const char *value) { if (!strcmp(var, "gc.rerereresolved")) cutoff_resolve = git_config_int(var, value); else if (!strcmp(var, "gc.rerereunresolved")) cutoff_noresolve = git_config_int(var, value); else return git_default_config(var, value); return 0; }
false
false
false
false
false
0
HandleCrash ( int ) { static char sBuffer[1024]; int iFd; if ( !g_pCrashLog_LastQuery ) return; snprintf ( sBuffer, sizeof(sBuffer), "%s.%d", g_sCrashLog_Path, (int)getpid() ); if ( ( iFd = open ( sBuffer, O_WRONLY | O_CREAT | O_TRUNC, 0644 ) ) != -1 ) { const int iSize = Min( g_iCrashLog_LastQuerySize, g_i...
false
false
false
false
false
0
say_from_to(struct vc_data *vc, u_long from, u_long to, int read_punc) { int i = 0; u_char tmp; u_short saved_punc_mask = spk_punc_mask; spk_old_attr = spk_attr; spk_attr = get_attributes((u_short *) from); while (from < to) { buf[i++] = (char)get_char(vc, (u_short *) from, &tmp); from += 2; if (i...
false
false
false
false
false
0
ipxcp_nakci(f, p, len) fsm *f; u_char *p; int len; { int linkunit = f->unit; int unit = lns[linkunit].ipxcp_unit; int i; ipxcp_options *go = &ipxcp_gotoptions[unit]; ipxcp_options *ao = &ipxcp_allowoptions[unit]; ipxcp_options *ho = &ipxcp_hisoptions[unit]; u_char citype, cilen, *n...
false
false
false
false
false
0
stopEditMeshBoundaries(bool cancel_edit) { // If nothing was really edited if (modelInfo->editingMeshBoundaries == false) return; modelInfo->editingMeshBoundaries = false; modelData->splitCombineInfoIndex = 0; // Reset split/combine info data for (int i = 0; i < MAX_NOF_SPLIT_COMBINE_INFOS; i++) { ...
false
false
false
false
false
0
fmarks_check_one(fm, name, buf) xfmark_T *fm; char_u *name; buf_T *buf; { if (fm->fmark.fnum == 0 && fm->fname != NULL && fnamecmp(name, fm->fname) == 0) { fm->fmark.fnum = buf->b_fnum; vim_free(fm->fname); fm->fname = NULL; } }
false
false
false
false
false
0
precalc_notes(void) { long i; for (i=0; i<MAXOCTAVE*12; i++) { char *s = notelookup + 4*i; long n = i % 12; s[2] = '0' + i / 12; n += (n > 2) + (n > 7); s[0] = 'A' + (n >> 1); if (n & 1) { s[1] = '#'; } else { s[1] = '-'; } } }
false
false
false
false
false
0
OTF_WStream_writeDefKeyValueKV( OTF_WStream* wstream, uint32_t key, OTF_Type type, const char* name, const char *description, OTF_KeyValueList* list ) { OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); /* buffer can be NULL if file-open fails */ if ( NULL == buffer ) return 0; if ( OTF_WSTREAM_FORM...
false
false
false
false
false
0
p_attw_enable_toggle_update_callback(GtkWidget *widget, gboolean *val) { GapStbAttrWidget *attw; attw = g_object_get_data( G_OBJECT(widget), OBJ_DATA_KEY_ATTW ); if((attw) && (val)) { if(attw->stb_elem_refptr) { p_attw_push_undo_and_set_unsaved_changes(attw); if (GTK_TOGGLE_BUTTON (widget)...
false
false
false
false
false
0
folks_abstract_field_details_real_values_equal (FolksAbstractFieldDetails* self, FolksAbstractFieldDetails* that) { gboolean result = FALSE; GEqualFunc equal_func = NULL; GEqualFunc _tmp0_ = NULL; gboolean _tmp2_ = FALSE; GType _tmp3_ = 0UL; FolksAbstractFieldDetails* _tmp4_ = NULL; GType _tmp5_ = 0UL; gboolean...
false
false
false
false
false
0
_go_component_load_data (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *unknown) { GOCompXMLReadState *state = (GOCompXMLReadState *) xin->user_state; GOComponentClass *klass; GOComponent *component = state->component; size_t length; g_return_if_fail (component); component->data = component->destroy_data = g_base64_d...
false
false
false
false
false
0
GNATS_qfmt (int ac, char **av) { ErrorDesc err; if (! chk_nargs (ac, "query format")) { return; } queryFormat = findQueryFormat (currentDatabase, av[0], &err); if (queryFormat != NULL) { printf ("%d Ok.\r\n", CODE_OK); } else { print_server_errors (err); } }
false
false
false
false
false
0
handle_pmi1_cmd(int fd, int lrank) { char *buf = NULL; int n, len, size, rc = SLURM_SUCCESS; debug3("mpi/pmi2: in handle_pmi1_cmd"); /* TODO: read until newline */ size = MAX_READLINE; buf = xmalloc(size + 1); while ( (n = read(fd, buf, size)) < 0 && errno == EINTR ); if (n < 0) { error("mpi/pmi2: failed to...
false
false
false
false
false
0
go_plugin_is_loaded (GOPlugin *plugin) { g_return_val_if_fail (GO_IS_PLUGIN (plugin), FALSE); return plugin->has_full_info && plugin->loader != NULL && go_plugin_loader_is_base_loaded (plugin->loader); }
false
false
false
false
false
0
_uudecode(char *bufcoded, apr_pool_t *p) { register char *bufin = bufcoded; register unsigned char *bufout; register int nprbytes; unsigned char *bufplain; int nbytesdecoded; /* Find the length */ while(pr2six[(int)*(bufin++)] <= 63); nprbytes = bufin - bufcoded - 1; nbytesdecoded = ((nprbytes+3)/4) ...
false
false
false
false
false
0
PGTYPESdate_from_timestamp(timestamp dt) { date dDate; dDate = 0; /* suppress compiler warning */ if (!TIMESTAMP_NOT_FINITE(dt)) { #ifdef HAVE_INT64_TIMESTAMP /* Microseconds to days */ dDate = (dt / USECS_PER_DAY); #else /* Seconds to days */ dDate = (dt / (double) SECS_PER_DAY); #endif } return ...
false
false
false
false
false
0
release(DataFile f, int32_t reg, unsigned int size) { bits[f].clrRange(reg, size); INFO_DBG(0, REG_ALLOC, "reg release: %u[%i] %u\n", f, reg, size); }
false
false
false
false
false
0
s5m_check_peding_alarm_interrupt(struct s5m_rtc_info *info, struct rtc_wkalrm *alarm) { int ret; unsigned int val; switch (info->device_type) { case S5M8767X: case S5M8763X: ret = regmap_read(info->regmap, S5M_RTC_STATUS, &val); val &= S5M_ALARM0_STATUS; break; case S2MPS14X: case S2MPS13X: ret = regm...
false
false
false
false
false
0
FBSetRubberBanding(mode) /* if mode is lower case will clip to grid point */ int mode; { /* need some hokum for button 3 box */ #ifdef __STDC__ static void (*func)(int,int,int,int); #else static void (*func)(); #endif static int X, Y; static int lastR; switch (mode) { case 'l': fun...
false
false
false
false
false
0
eina_quadtree_show(Eina_QuadTree_Item *object) { EINA_MAGIC_CHECK_QUADTREE_ITEM(object, EINA_FALSE); object->quad->lost = EINA_TRUE; if (object->visible) return EINA_TRUE; object->visible = EINA_TRUE; if (!object->change) return eina_quadtree_change(object); return EINA_TRUE; }
false
false
false
false
false
0
moof_del(GF_Box *s) { GF_MovieFragmentBox *ptr = (GF_MovieFragmentBox *)s; if (ptr == NULL) return; if (ptr->mfhd) gf_isom_box_del((GF_Box *) ptr->mfhd); gf_isom_box_array_del(ptr->TrackList); if (ptr->mdat) gf_free(ptr->mdat); gf_free(ptr); }
false
false
false
false
false
0
flow_loops_free (struct loops *loops) { if (loops->larray) { unsigned i; loop_p loop; /* Free the loop descriptors. */ FOR_EACH_VEC_SAFE_ELT (loops->larray, i, loop) { if (!loop) continue; flow_loop_free (loop); } vec_free (loops->larray); } }
false
false
false
false
false
0
strbuf_getwholeline(struct strbuf *sb, FILE *fp, int term) { int ch; strbuf_grow(sb, 0); if (feof(fp)) return EOF; strbuf_reset(sb); while ((ch = fgetc(fp)) != EOF) { strbuf_grow(sb, 1); sb->buf[sb->len++] = ch; if (ch == term) break; } if (ch == EOF && sb->len == 0) return EOF; sb->buf[sb->len]...
false
false
false
false
false
0
set_from_file (PyObject *self, PyObject *args) { gchar *filename; GdkPixbuf *alphaified; GError *error = NULL; if (!PyArg_ParseTuple (args, "s", &filename)) return NULL; /* kill old pixbuf */ if (G_LIKELY (TIMAGE (self)->pbuf)) g_object_unref (TIMAGE (self)->pbuf); /* make new pixbuf */ if (!...
false
false
false
false
false
0
domain_whitelist_load(domain_whitelist_t* whitelist, const char* orig_contents) { char* contents; contents = strdup(orig_contents); int num_lines = 0; char* ptr = contents; while (strtok(ptr, "\n") != NULL) { ++num_lines; ptr = NULL; } whitelist->size = num_lines; whit...
false
false
false
false
true
1
prepare(tStdXCombPtr xco, bool) { theLastXComb = xco; lastChannelsIterator = channelMap.find(lastXCombPtr()); if ( lastChannelsIterator == channelMap.end() ) { map<Ptr<Tree2toNDiagram>::ptr,PhasespaceTree> channels; for ( StandardXComb::DiagramVector::const_iterator d = lastXComb().diagrams().begi...
false
false
false
false
false
0
list_query_unlocked(List *list, ssize_t *index, list_query_t *query, void *data) { size_t i; if (!list || !index || !query) return set_errno(EINVAL); if (*index >= list->length) return set_errno(EINVAL); for (i = *index; i < list->length; ++i) { if (query(list->list[i], (size_t *)index, data)) return *...
false
false
false
false
false
0
SizeGF_IPMPX_NotifyToolEvent(GF_IPMPX_Data *_p) { GF_IPMPX_NotifyToolEvent*p = (GF_IPMPX_NotifyToolEvent*)_p; return (p->OD_ID || p->ESD_ID) ? 10 : 6; }
false
false
false
false
false
0
au_ino(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, unsigned int d_type, ino_t *ino) { int err; struct mutex *mtx; /* prevent hardlinked inode number from race condition */ mtx = NULL; if (d_type != DT_DIR) { mtx = &au_sbr(sb, bindex)->br_xino.xi_nondir_mtx; mutex_lock(mtx); } err = au_xin...
false
false
false
false
false
0
i1480_phy_fw_upload(struct i1480 *i1480) { int result; const struct firmware *fw; const char *data_itr, *data_top; const size_t MAX_BLK_SIZE = 480; /* 160 triads */ size_t data_size; u8 phy_stat; result = request_firmware(&fw, i1480->phy_fw_name, i1480->dev); if (result < 0) goto out; /* Loop writing data i...
false
false
false
false
false
0
bcf_sr_destroy(bcf_srs_t *files) { if ( !files->nreaders ) { free(files); return; } int i; for (i=0; i<files->nreaders; i++) { bcf_sr_t *reader = &files->readers[i]; if ( reader->tbx_idx ) tbx_destroy(reader->tbx_idx); if ( reader->bcf_idx ) hts_idx_destr...
false
false
false
false
false
0
FixGlyphAttrsInRules(GrcManager * pcman, GrcFont * pfont) { for (size_t iprule = 0; iprule < m_vprule.size(); iprule++) { m_vprule[iprule]->FixGlyphAttrsInRules(pcman, pfont); } // While we're at it... FixFeatureTestsInPass(pfont); }
false
false
false
false
false
0