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
adjustInventory ( int numberOfNewJobs ) { QMutexLocker l(m_mutex); Q_UNUSED(l); // no of threads that can be created: const int reserve = m_inventoryMax - m_inventory.count(); if ( reserve > 0 ) { for ( int i = 0; i < qMin ( reserve, numberOfNewJobs ); ++i ) { Thread *th = cr...
false
false
false
false
false
0
acpi_node_get_gpiod(struct fwnode_handle *fwnode, const char *propname, int index, struct acpi_gpio_info *info) { struct acpi_gpio_lookup lookup; struct acpi_device *adev; int ret; adev = to_acpi_device_node(fwnode); if (adev) return acpi_get_gpiod_by_index(adev, propname, index, info); if...
false
false
false
false
false
0
array_bitmap_copy(bits8 *destbitmap, int destoffset, const bits8 *srcbitmap, int srcoffset, int nitems) { int destbitmask, destbitval, srcbitmask, srcbitval; Assert(destbitmap); if (nitems <= 0) return; /* don't risk fetch off end of memory */ destbitmap += destoffset / 8; destbitm...
false
false
false
false
false
0
pthread_attr_setstacksize(pthread_attr_t*attr,size_t stacksize) { if (stacksize>PTHREAD_STACK_MAXSIZE) return EINVAL; if (stacksize<PTHREAD_STACK_MINSIZE) return EINVAL; attr->__stacksize=stacksize; return 0; }
false
false
false
false
false
0
cfapi_object_create(int *type, ...) { va_list args; int ival; object **robj; va_start(args, type); ival = va_arg(args, int); *type = CFAPI_POBJECT; switch (ival) { case 0: robj = va_arg(args, object **); *robj = object_new(); break; case 1: { /* Named object...
false
false
false
false
false
0
crm_remote_send(crm_remote_t * remote, xmlNode * msg) { int rc = -1; char *xml_text = NULL; int len = 0; xml_text = dump_xml_unformatted(msg); if (xml_text) { len = strlen(xml_text); } else { crm_err("Invalid XML, can not send msg"); return -1; } rc = crm_remote...
false
false
false
false
false
0
subarray(unsigned adr, unsigned wid) const { const unsigned BIT2_PER_WORD = 8*sizeof(unsigned long); unsigned awid = (wid + BIT2_PER_WORD - 1) / (BIT2_PER_WORD); unsigned long*val = new unsigned long[awid]; for (unsigned idx = 0 ; idx < awid ; idx += 1) val[idx] = 0; if (size_ <= ...
false
false
false
false
false
0
tboot_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { switch (action) { case CPU_DYING: atomic_inc(&ap_wfs_count); if (num_online_cpus() == 1) if (tboot_wait_for_aps(atomic_read(&ap_wfs_count))) return NOTIFY_BAD; break; } return NOTIFY_OK; }
false
false
false
false
false
0
set_param_str(const char *val, const struct kernel_param *kp) { action_fn fn = (action_fn) kp->arg; int rv = 0; char valcp[16]; char *s; strncpy(valcp, val, 16); valcp[15] = '\0'; s = strstrip(valcp); rv = fn(s, NULL); if (rv) goto out; check_parms(); if (watchdog_user) rv = ipmi_...
true
true
false
false
false
1
shift_left(float *dat, int w, int h, int dn, double a, double b) { int x, y; float *sp, *dp; for (y = 0; y < h; y++) { dp = dat + w * y; sp = dat + w * y + dn; for (x = 0; x < w - dn - 1; x++) { *dp = *sp * b + *(sp+1) * a; dp++; sp++; } *dp++ = *sp * b; for (x = 0; x < dn; x++) *dp++ = 0.0; ...
false
false
false
false
false
0
UndoMove( const Unit &u ) { HistEvent *he = static_cast<HistEvent *>( events.Head() ), *tmp; while ( he ) { tmp = static_cast<HistEvent *>( he->Next() ); if ( ((he->type == HIST_MOVE) || (he->type == HIST_TRANSPORT_CRYSTALS) || (he->type == HIST_TRANSPORT_UNIT)) && (he->data[0...
false
false
false
false
false
0
thread_main(void *param) { int read; tftpd_thread *ptr; socklen_t len; struct sockaddr_storage ss; struct sockaddr *sa; struct server_socket *ssocket; sa = (struct sockaddr *)&ss; ssocket = (struct server_socket *)param; pthread_once(&thread_once, fun_thread_once); ptr = pthread_getspecific(th...
false
false
false
false
false
0
GetPageCount() const { if ( !(m_iFlags & wxPG_MAN_FL_PAGE_INSERTED) ) return 0; return m_arrPages.GetCount(); }
false
false
false
false
false
0
str_to_utf8_full (const char * str, int len, int * bytes_read, int * bytes_written) { g_return_val_if_fail (str_to_utf8_full_impl, NULL); return str_to_utf8_full_impl (str, len, bytes_read, bytes_written); }
false
false
false
false
false
0
pl_print_lockee (char *str, int size, fd_t *fd, loc_t *loc) { inode_t *inode = NULL; char *ipath = NULL; int ret = 0; if (fd) inode = fd->inode; if (loc) inode = loc->inode; if (!inode) { snprintf (str, size, "<...
false
false
false
false
false
0
drbd_send_all(struct drbd_connection *connection, struct socket *sock, void *buffer, size_t size, unsigned msg_flags) { int err; err = drbd_send(connection, sock, buffer, size, msg_flags); if (err < 0) return err; if (err != size) return -EIO; return 0; }
false
false
false
false
false
0
cut_super_hmdf_table(Hmdf_table *root) { Hmdf_table *chmdf,*nhmdf; for(chmdf=root->children;chmdf!=NULL;chmdf=chmdf->brothers){ for(nhmdf=chmdf;nhmdf!=NULL;nhmdf=nhmdf->next){ nhmdf->parent = NULL; } } for(chmdf=root;chmdf!=NULL;chmdf=chmdf->next){ chmdf->children = NULL; } }
false
false
false
false
false
0
operator[]( int idx ) { return (idx >= 0 && idx < Arrays.size())? Arrays[idx]: scratch; }
false
false
false
false
false
0
destroy () { g_source_remove (timer); if (layout) g_object_unref (G_OBJECT (layout)); gtk_widget_destroy (text_area); g_object_unref (G_OBJECT (gc1)); g_object_unref (G_OBJECT (gc2)); }
false
false
false
false
false
0
_dxf_ExWaitForPeers() { fd_set fdset; int npeers, npeers_done, limit, k, nselect; SlavePeers *sp; DistMsg pcktype; int maxfd; int b; npeers = npeers_done = 0; maxfd = 0; FD_ZERO (&fdset); limit = SIZE_LIST(_dxd_slavepeers); /* don't wait for peer0 whic...
false
false
false
true
false
1
system_parse_config_string2(const char *token, char *cptr, char* value, size_t size) { if (strlen(cptr) < size) { strcpy(value, cptr); } else { netsnmp_config_error("%s token too long (must be < %lu):\n\t%s", token, (unsigned long)size, cp...
false
true
false
false
false
1
hash_create(hashcount_t maxcount, hash_comp_t compfun, hash_fun_t hashfun) { hash_t *hash; // Fixed size for our usage //if (hash_val_t_bit == 0) /* 1 */ //compute_bits(); hash = malloc(sizeof *hash); /* 2 */ if (hash) { /* 3 */ hash->table = malloc(sizeof *hash->table * INIT...
false
false
false
false
false
0
ParseVASection(const char* szCurrent, const char** szCurrentOut) { unsigned int iCurIndex = 0; for ( ;; ) { if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break; // "end\n" - Ends the "vertexanimation" section if (TokenMatch(szCurrent,"end",3)) break; // "time <n>\n" if (TokenMatch(szCurrent,"time...
false
false
false
false
false
0
qrt_apply_patch4(struct qrt_receive *qrcv, const uchar *data, int len, const struct qrp_patch *patch) { struct routing_table *rt = qrcv->table; int i; g_assert(qrcv->table != NULL); /* True for this variant of patch function. 8-bit, no expansion. */ g_assert((int)rt->client_slots == rt->slots); g_assert(qrcv->...
false
false
false
false
false
0
yymatchChar(int c) { if (yypos >= yylimit && !yyrefill()) return 0; if (yybuf[yypos] == c) { ++yypos; yyprintf((stderr, " ok yymatchChar(%c) @ %s\n", c, yybuf+yypos)); return 1; } yyprintf((stderr, " fail yymatchChar(%c) @ %s\n", c, yybuf+yypos)); return 0; }
false
false
false
false
false
0
write_csv_file (FILE *f, GGobiData *d, ggobid *gg) { gboolean ok = false; gint j; gint *cols, ncols; ncols = 0; if (gg->save.column_ind == ALLCOLS) { cols = (gint *) g_malloc (d->ncols * sizeof(gint)); for(j = 0; j < d->ncols; j++) { cols[j] = j; ncols++; } } else if (gg->save.colum...
false
false
false
false
false
0
CommandImportParty(char *sz) { FILE *gamf, *matf, *pf; char *tmpfile; int rc; sz = NextToken(&sz); if (!sz || !*sz) { outputl(_("You must specify a PartyGammon file to import (see `help " "import party').")); return; } if ((gamf = g_fopen(sz, "r")) == 0) { outputer...
false
false
false
false
true
1
trim(char *str) { char *pch = str; while(isspace(*pch)) { pch++; } if(pch != str) { memmove(str, pch, (strlen(pch) + 1)); } pch = (char*)(str + (strlen(str) - 1)); while(isspace(*pch)) { pch--; } *++pch = '\0'; return str; }
false
false
false
false
false
0
classHandler(Node *n) { String *name = Getattr(n, "sym:name"); String *kind = Getattr(n, "kind"); Node *c; if (Strcmp(kind, "struct")) { Printf(stderr, "Don't know how to deal with %s kind of class yet.\n", kind); Printf(stderr, " (name: %s)\n", name); SWIG_exit(EXIT_FAILURE); } Printf(f_cl, ...
false
false
false
false
false
0
mapDelimiters(char *s) { char *p; if (s == 0) { return 0; } for (p = s; *p; p++) { if (*p == '\\') { *p = '/'; } else if (*p == ':') { s = &p[1]; } } return s; }
false
false
false
false
false
0
begin_tex_preamble(int *pln, int *pcode, int *cp) { TeXInterface* iface = TeXInterface::getInstance(); iface->resetPreamble(); // Start with pcode from the next line (*pln)++; begin_init(); TeXPreambleKey pre_key; pre_key.setDocumentClass(iface->getDocumentClass()); while (true) { int st = begin_token(&pcode,...
false
false
false
false
false
0
sg_update_mem(void **dest, const void *src, size_t len) { char *new; if (src == NULL) { /* We're being told to set it to NULL. */ free(*dest); *dest = NULL; return SG_ERROR_NONE; } new = sg_realloc(*dest, len); if (new == NULL) { RETURN_FROM_PREVIOUS_ERROR( "tools", sg_get_error() ); } memcpy(new, s...
false
false
false
false
false
0
cache_add_metadata(metadata_t *metadata) { bucket_t *bucket; /* Check if cache needs cleaning */ if (cache_item_count == CACHE_SIZE) cache_cleanup_old_items(); /* Insert the element */ bucket = &cache_hash_table[CACHE_HASH(metadata->md_vfile)]; metadata->md_previous = NULL; metadata->md_next = bucke...
false
false
false
false
false
0
__os_map(env, path, fhp, len, is_region, is_rdonly, addrp) ENV *env; char *path; DB_FH *fhp; int is_region, is_rdonly; size_t len; void **addrp; { DB_ENV *dbenv; int flags, prot, ret; void *p; /* * We pass a DB_ENV handle to the user's replacement map function, * so there must be a valid handle. */ DB...
false
false
false
false
false
0
xaccAccountSetDescription (Account *acc, const char *str) { AccountPrivate *priv; /* errors */ g_return_if_fail(GNC_IS_ACCOUNT(acc)); /* optimizations */ priv = GET_PRIVATE(acc); if (g_strcmp0(str, priv->description) == 0) return; xaccAccountBeginEdit(acc); CACHE_REPLACE(priv-...
false
false
false
false
false
0
generate_tris_ushort_first2first( unsigned start, unsigned nr, void *_out ) { ushort *out = (ushort*)_out; unsigned i, j; (void)j; for (i = start; i < (nr+start); i+=3) { (out+i)[0] = (ushort)(i); (out+i)[1] = (ushort)(i+1); (out+i)[2] = (ushort)(i+2); } }
false
false
false
false
false
0
events_import_abs_params(struct event_dev *edev) { struct input_dev *input_dev = edev->input; void __iomem *addr = edev->addr; u32 val[4]; int count; int i, j; __raw_writel(PAGE_ABSDATA, addr + REG_SET_PAGE); count = __raw_readl(addr + REG_LEN) / sizeof(val); if (count > ABS_MAX) count = ABS_MAX; for (i =...
false
false
false
false
false
0
pan_folder_tree_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height) { gint x, y; gint level; gint w, h; level = 0; x = PAN_BOX_BORDER; y = PAN_BOX_BORDER; w = PAN_BOX_BORDER * 2; h = PAN_BOX_BORDER * 2; pan_folder_tree_path(pw, dir_fd, &x, &y, &level, NULL, &w, &h); if (width) *width = w; ...
false
false
false
false
false
0
GC_core_malloc(size_t lb) #else GC_API void * GC_CALL GC_malloc(size_t lb) #endif { void *op; void **opp; size_t lg; DCL_LOCK_STATE; if(SMALL_OBJ(lb)) { lg = GC_size_map[lb]; opp = (void **)&(GC_objfreelist[lg]); LOCK(); if (EXPECT((op = *opp) == 0, FALSE)) { ...
false
false
false
false
false
0
padded_grid_repeat_cb (CoglTexture *slice_texture, const float *slice_texture_coords, const float *meta_coords, void *user_data) { ForeachData *data; float mapped_coords[4]; /* Ignore padding slices for the current grid */ if (!slice_texture)...
false
false
false
false
false
0
wilc_deinit_host_int(struct net_device *net) { int s32Error = 0; struct wilc_priv *priv; priv = wdev_priv(net->ieee80211_ptr); priv->gbAutoRateAdjusted = false; priv->bInP2PlistenState = false; op_ifcs--; s32Error = host_int_deinit(priv->hWILCWFIDrv); /* Clear the Shadow scan */ clear_shadow_scan(priv);...
false
false
false
false
false
0
player_wipe(void) { int i; /* Wipe the player */ (void)WIPE(p_ptr, player_type); /* Clear the inventory */ for (i = 0; i < ALL_INVEN_TOTAL; i++) object_wipe(&inventory[i]); /* Start with no artifacts made yet */ for (i = 0; i < z_info->a_max; i++) { artifact_type *a_ptr = &a_info[i]; a_ptr->created = F...
false
false
false
false
false
0
ario_cover_handler_finalize (GObject *object) { ARIO_LOG_FUNCTION_START; ArioCoverHandler *cover_handler; g_return_if_fail (object != NULL); g_return_if_fail (IS_ARIO_COVER_HANDLER (object)); cover_handler = ARIO_COVER_HANDLER (object); g_return_if_fail (cover_handler-...
false
false
false
false
false
0
defaults_get_item (GList *defaults, const gchar *key) { GList *l; for (l = defaults; l; l = l->next) { IgeConfDefaultItem *item = l->data; if (strcmp (item->key, key) == 0) { return item; } } ...
false
false
false
false
false
0
overlapsWrappedFrame(fp_Line * pLine) { UT_Rect * pRec = pLine->getScreenRect(); if(pRec == NULL) { return false; } bool bRes = overlapsWrappedFrame(*pRec); delete pRec; return bRes; }
false
false
false
false
false
0
hvt_op_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct hvutil_transport *hvt; int ret; hvt = container_of(file->f_op, struct hvutil_transport, fops); if (wait_event_interruptible(hvt->outmsg_q, hvt->outmsg_len > 0 || hvt->mode != HVUTIL_TRANSPORT_CHARDEV)) return -E...
false
false
false
false
false
0
setDefaultOutputs(struct matrox_fb_info *minfo) { unsigned int i; const char* ptr; minfo->outputs[0].default_src = MATROXFB_SRC_CRTC1; if (minfo->devflags.g450dac) { minfo->outputs[1].default_src = MATROXFB_SRC_CRTC1; minfo->outputs[2].default_src = MATROXFB_SRC_CRTC1; } else if (dfp) { minfo->outputs[2].de...
false
false
false
false
false
0
Send () { struct evbuffer *evb = evbuffer_new(); evbuffer_add_32be(evb, peer_channel_id_); bin_t data = bin_t::NONE; if ( is_established() ) { // FIXME: seeder check AddHave(evb); AddAck(evb); if (!file().is_complete()) AddHint(evb); AddPex(evb); ...
false
false
false
false
false
0
ResolveRecoveryConflictWithSnapshot(TransactionId latestRemovedXid, RelFileNode node) { VirtualTransactionId *backends; /* * If we get passed InvalidTransactionId then we are a little surprised, * but it is theoretically possible in normal running. It also happens * when replaying already applied WAL records a...
false
false
false
false
false
0
gst_nuv_demux_stream_extend_header (GstNuvDemux * nuv) { GstBuffer *buf = NULL; GstFlowReturn res = GST_FLOW_OK; res = gst_nuv_demux_read_bytes (nuv, 1, FALSE, &buf); if (res != GST_FLOW_OK) { if (buf != NULL) { gst_buffer_unref (buf); } return res; } if (buf->data[0] == 'X') { nuv_f...
false
false
false
false
false
0
plpgsql_stmt_typename(PLpgSQL_stmt *stmt) { switch ((enum PLpgSQL_stmt_types) stmt->cmd_type) { case PLPGSQL_STMT_BLOCK: return _("statement block"); case PLPGSQL_STMT_ASSIGN: return _("assignment"); case PLPGSQL_STMT_IF: return "IF"; case PLPGSQL_STMT_CASE: return "CASE"; case PLPGSQL_STMT_LOOP...
false
false
false
false
false
0
gsql_cursor_open (GSQLCursor *cursor, gboolean background) { GSQL_TRACE_FUNC; GError *err; struct CursorOpenBGStruct *bg_struct; g_return_val_if_fail (GSQL_IS_CURSOR (cursor), GSQL_CURSOR_STATE_ERROR); GSQLCursorState state = GSQL_CURSOR_STATE_RUN; if (background) { GSQL_DEBUG ("Run sql in background");...
false
false
false
false
false
0
ilLoadIlbm(ILconst_string FileName) { ILHANDLE IlbmFile; ILboolean bIlbm = IL_FALSE; IlbmFile = iopenr(FileName); if (IlbmFile == NULL) { ilSetError(IL_COULD_NOT_OPEN_FILE); return bIlbm; } bIlbm = ilLoadIlbmF(IlbmFile); icloser(IlbmFile); return bIlbm; }
false
false
false
false
false
0
read(hsStream* S) { hsBitVector flags; flags.read(S); if (flags[kHasTitle]) { size_t len = S->readShort(); fTitle = S->readStr(len); } if (flags[kHasSpawnPt]) { size_t len = S->readShort(); fSpawnPt = S->readStr(len); } if (flags[kHasCameraStack]) { si...
false
false
false
false
false
0
ParseIndexList ( const CSphString & sIndexes, CSphVector<CSphString> & dOut ) { CSphString sSplit = sIndexes; char * p = (char*)sSplit.cstr(); while ( *p ) { // skip non-alphas while ( (*p) && !sphIsAlpha(*p) ) p++; if ( !(*p) ) break; // this is my next index name const char * sNext = p; while ( sphIs...
false
false
false
false
false
0
spk_set_key_info(const u_char *key_info, u_char *k_buffer) { int i = 0, states, key_data_len; const u_char *cp = key_info; u_char *cp1 = k_buffer; u_char ch, version, num_keys; version = *cp++; if (version != KEY_MAP_VER) return -1; num_keys = *cp; states = (int)cp[1]; key_data_len = (states + 1) * (num_key...
false
false
false
false
false
0
dump_value(struct nlmsghdr *n, int tlv, unsigned long val, struct tcf_meta_val *hdr) { __u32 t; switch (TCF_META_TYPE(hdr->kind)) { case TCF_META_TYPE_INT: t = val; addattr_l(n, MAX_MSG, tlv, &t, sizeof(t)); break; case TCF_META_TYPE_VAR: if (TCF_META_ID(hdr->kind) == TCF_META_ID_VALUE) { ...
false
false
false
false
false
0
skip_anyof(p) char_u *p; { int cpo_lit; /* 'cpoptions' contains 'l' flag */ int cpo_bsl; /* 'cpoptions' contains '\' flag */ #ifdef FEAT_MBYTE int l; #endif cpo_lit = vim_strchr(p_cpo, CPO_LITERAL) != NULL; cpo_bsl = vim_strchr(p_cpo, CPO_BACKSL) != NULL; if (*p == '^') /* Complement of...
false
false
false
false
false
0
update_supernode_reg( n2n_edge_t * eee, time_t nowTime ) { if ( eee->sn_wait && ( nowTime > (eee->last_register_req + (eee->register_lifetime/10) ) ) ) { /* fall through */ traceEvent( TRACE_DEBUG, "update_supernode_reg: doing fast retry." ); } else if ( nowTime < (eee->last_register_req...
false
false
false
false
false
0
get_user_login_name(void) { static char buffer[20]; struct passwd *pw; int uid; uid = geteuid(); pw = getpwuid(uid); if (!pw) sprintf(buffer, "%d", uid); else { size_t len; len = strlen(pw->pw_name); if (len >= sizeof(buffer)) ...
false
false
false
false
false
0
widthEntry(const QString & text) { int w = TraceWire::widthEntry(text, sender()); if (w == 0) return; m_traceWidth = w; }
false
false
false
false
false
0
init_map() { if(!m_maps_inited) { //Fill maps. //Ideals: m_map_gda_type_to_glom_type[GDA_TYPE_NUMERIC] = TYPE_NUMERIC; m_map_gda_type_to_glom_type[G_TYPE_INT] = TYPE_NUMERIC; //Only for "serial" (auto-increment) fields. m_map_gda_type_to_glom_type[G_TYPE_STRING] = TYPE_TEXT; m_map_gda_type_...
false
false
false
false
false
0
fp_div_2(fp_int * a, fp_int * b) { int x, oldused; oldused = b->used; b->used = a->used; { register fp_digit r, rr, *tmpa, *tmpb; /* source alias */ tmpa = a->dp + b->used - 1; /* dest alias */ tmpb = b->dp + b->used - 1; /* carry */ r = 0; for (x = b->used - 1; x >= 0; x...
false
false
false
false
true
1
isns_policy_validate_node_type(const isns_policy_t *policy, uint32_t type) { int rv = 0; if ((~policy->ip_node_types & type) == 0) rv = 1; isns_debug_auth(":: policy %s registration of node type 0x%x %s\n", policy->ip_name, type, rv? "permitted" : "DENIED"); return rv; }
false
false
false
false
false
0
cobalt_alsa_pb_pcm_data(struct snd_cobalt_card *cobsc, u8 *pcm_data, size_t skip, size_t samples) { struct snd_pcm_substream *substream; struct snd_pcm_runtime *runtime; unsigned long flags; unsigned int pos; unsigned int stride; bool is_s32; unsigned i; dprintk("cobalt alsa pb ptr=%p data=%p sa...
false
false
false
false
false
0
v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap ) { struct video_data *s = s1->priv_data; struct v4l2_input input; struct v4l2_standard standard; int i; if(ap->channel>=0) { /* set tv video input */ memset (&input, 0, sizeof (input)); input.index = ap->chann...
false
false
false
false
false
0
AhDecodeAmlOpcode ( char *OpcodeString) { const AH_AML_OPCODE *Op; UINT32 Opcode; UINT8 Prefix; if (!OpcodeString) { AhFindAmlOpcode (NULL); return; } Opcode = ACPI_STRTOUL (OpcodeString, NULL, 16); if (Opco...
false
false
false
false
false
0
do_thirdget(int mode, char *filename, const char *path) { char cmd[WORK_QUEUE_LINE_MAX]; char cached_filename[WORK_QUEUE_LINE_MAX]; char *cur_pos; if(mode != WORK_QUEUE_FS_CMD) { struct stat info; if(stat(path, &info) != 0) { debug(D_WQ, "Path %s not accessible. (%s)\n", path, strerror(errno)); return 0;...
false
false
false
false
false
0
provider_free(gpointer data) { struct connman_provider *provider = data; if (provider == NULL) return; g_free(provider->host); g_free(provider->domain); g_free(provider->name); g_free(provider->type); g_free(provider); }
false
false
false
false
false
0
sane_read_direct (SANE_Handle handle, SANE_Byte *dst_buf, SANE_Int max_len, SANE_Int * len) { SHARP_Scanner *s = handle; SANE_Status status; size_t nread; DBG (10, "<< sane_read_direct "); DBG (20, "remaining: %lu ", (u_long) s->bytes_to_read); *len = 0; if (s->bytes_to_read == 0) { do_can...
false
false
false
false
false
0
EST_matrix_bounds_check(int r, int c, int num_rows, int num_columns, bool set) { const char *what = set?"set":"access"; if ((r < 0) || (r >= num_rows)) { cerr << "Tried to " << what << " row " << r << " of " << num_rows << " row matrix\n"; return FALSE; } if ((...
false
false
false
false
false
0
efar_set_dmamode (struct ata_port *ap, struct ata_device *adev) { struct pci_dev *dev = to_pci_dev(ap->host->dev); u8 master_port = ap->port_no ? 0x42 : 0x40; u16 master_data; u8 speed = adev->dma_mode; int devid = adev->devno + 2 * ap->port_no; unsigned long flags; u8 udma_enable; static const /* ISP RTC...
false
false
false
false
false
0
canUndo() const { if (m_curPlayer == NoColor) return false; return (m_player[m_curPlayer]->isUndoAllowed() && !m_undoStack.isEmpty()); }
false
false
false
false
false
0
js_MakeArraySlow(JSContext *cx, JSObject *obj) { JS_ASSERT(obj->getClass() == &js_ArrayClass); /* * Create a native scope. All slow arrays other than Array.prototype get * the same initial shape. */ uint32 emptyShape; JSObject *arrayProto = obj->getProto(); if (arrayProto->getClass()...
false
false
false
false
false
0
gegl_operation_get_bounding_box (GeglOperation *self) { GeglOperationClass *klass = GEGL_OPERATION_GET_CLASS (self); GeglRectangle rect = { 0, 0, 0, 0 }; if (klass->get_bounding_box) return klass->get_bounding_box (self); return rect; }
false
false
false
false
false
0
fill_shd_status_for_local_bricks (dict_t *dict, glusterd_volinfo_t *volinfo) { glusterd_brickinfo_t *brickinfo = NULL; char msg[1024] = {0,}; char key[1024] = {0,}; char value[1024] = {0,}; int index...
true
true
false
false
false
1
fops_setdefaults(struct config_file *defconf, CHAR16 *kname, UINTN maxlen, CHAR16 *devpath) { INTN i; /* * The first default config file is architecture dependent. This is useful * in case of network booting where the server is used for both types of * architectures. */ #if defined(CONFIG_ia64) #define FILEOPS...
false
false
false
false
false
0
at_spawn(struct at_pool *atp, void *arg, char *cmdline[]) { struct athread *at; int err; at = fork_thread(atp); if (!at) return NULL; if (at->pid == 0) { /* child */ char *argv[num_args(cmdline) + 2]; argv[0] = cmdline[0]; argv[1] = talloc_asprintf(NULL, "AT:%p/%lu/%i/%i/%i/%p", atp->p->pool, at...
false
false
false
false
false
0
PyVTKMutableObject_GetValue(PyObject *self) { if (PyVTKMutableObject_Check(self)) { return ((PyVTKMutableObject *)self)->value; } else { PyErr_SetString(PyExc_TypeError, "a vtk.mutable() object is required"); } return NULL; }
false
false
false
false
false
0
nsslowcert_GetCertTimes(NSSLOWCERTCertificate *c, PRTime *notBefore, PRTime *notAfter) { int rv; NSSLOWCERTValidity validity; rv = nsslowcert_GetValidityFields(c->validity.data,c->validity.len, &validity.notBefore,&validity.notAfter); if (rv != SECSuccess) { return rv; } /* convert DE...
false
false
false
false
false
0
CreateSrc( void ) { wxPanel * poPnl; // Create the temperature panel and controls #ifdef LAYOUT_MNGR poPnl = new wxPanel( this ); #else poPnl = this; #endif // LAYOUT_MNGR // Create input source #ifdef LAYOUT_MNGR m_oLblSrcName.Create( poPnl, ID_UNUSED, wxT("Signal Source") ); m_oChoSrcName.Create( poPn...
false
false
false
false
false
0
error_handle_string(ulong error_handle) { static char ebuf[20]; int others; sprintf(ebuf, "("); others = 0; if (error_handle & RETURN_ON_ERROR) sprintf(&ebuf[strlen(ebuf)], "%sROE", others++ ? "|" : ""); if (error_handle & FAULT_ON_ERROR) sprintf(&ebuf[strlen(ebuf)], "%sFOE", others++ ? "|" : ""); i...
false
false
false
false
false
0
deep_count_more_files_callback (GObject *source_object, GAsyncResult *res, gpointer user_data) { DeepCountState *state; GList *files, *l; GFileInfo *info; state = user_data; if (g_cancellable_is_cancelled (state->self->priv->cancellable)) { deep_count_finish (state); return; } ...
false
false
false
false
false
0
stop_streaming(struct vb2_queue *vq) { struct mxr_layer *layer = vb2_get_drv_priv(vq); struct mxr_device *mdev = layer->mdev; unsigned long flags; struct timer_list watchdog; struct mxr_buffer *buf, *buf_tmp; mxr_dbg(mdev, "%s\n", __func__); spin_lock_irqsave(&layer->enq_slock, flags); /* reset list */ laye...
false
false
false
false
false
0
get_mailboxes(PyObject *self, PyObject *args) { PyObject *mailboxes_tuple; GList *mailboxes_list; GList *walk; mailboxes_list = folder_get_list(); mailboxes_tuple = PyTuple_New(g_list_length(mailboxes_list)); if(mailboxes_tuple) { PyObject *mailbox_object; Py_ssize_t iMailbox; iMailbox = 0; ...
false
false
false
false
false
0
cmd_settab (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { if (*word_eol[2]) { strcpy (tbuf, sess->channel); safe_strcpy (sess->channel, word_eol[2], CHANLEN); fe_set_channel (sess); strcpy (sess->channel, tbuf); } return TRUE; }
false
true
false
false
false
1
calc_intern_pending_job_functional_tickets( lListElem *current, double sum_of_user_functional_shares, double sum_of_project_functional_shares, double sum_of_department_function...
false
false
false
false
false
0
walk_pud_level(struct seq_file *m, struct pg_state *st, pgd_t addr, unsigned long P) { int i; pud_t *start; pgprotval_t prot; start = (pud_t *) pgd_page_vaddr(addr); for (i = 0; i < PTRS_PER_PUD; i++) { st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT); if (!pud_none(*start)) { if (pud_l...
false
false
false
false
false
0
xpc_request_partition_activation_uv(struct xpc_rsvd_page *remote_rp, unsigned long remote_rp_gpa, int nasid) { short partid = remote_rp->SAL_partid; struct xpc_partition *part = &xpc_partitions[partid]; struct xpc_activate_mq_msg_activate_req_uv msg; part->remote_rp_pa = remote_rp_gpa; /* !!! _pa here is r...
false
false
false
false
false
0
showAdvancedMessageDialog(wxWindow* parent, int style, const wxString& primaryText, const wxString& secondaryText, AdvancedMessageDialogButtons& buttons, bool* showNeverAgain = 0, const wxString& dontShowAgainText = wxEmptyString) { if (!parent) parent = ::wxGetActiveWindow(); if (showNeverA...
false
false
false
false
false
0
print_peel_info(Peel_info *peel_head) { FILE *fp = stdout; Peel_info *p; int i = 1; fprintf(fp,"peel-info\n"); for(p = peel_head; p != NULL; p = p->next){ fprintf(fp, "peel_no ==>%d\n",i); fprintf(fp,"block_no =>%d\n", p->block_no); if(p->is_std) fprintf(fp,"std\...
false
false
false
false
false
0
SendMineWorldStates(uint32 mine) { MANGOS_ASSERT(mine == BG_AV_NORTH_MINE || mine == BG_AV_SOUTH_MINE); UpdateWorldState(BG_AV_MineWorldStates[mine][m_Mine_Owner[mine]], WORLD_STATE_ADD); if (m_Mine_Owner[mine] != m_Mine_PrevOwner[mine]) { UpdateWorldState(BG_AV_MineWorldStates[mine][m_Mine_PrevOwn...
false
false
false
false
true
1
engine_begin_frame() { if ( status == STATUS_ATTACK ) { anim_draw_bkgnd( terrain_icons->cross ); anim_draw_bkgnd( terrain_icons->expl1 ); anim_draw_bkgnd( terrain_icons->expl2 ); } if ( status == STATUS_MOVE && move_image ) image_draw_bkgnd( move_image ); gui_draw_bkgnds(...
false
false
false
false
false
0
L35() {register object *base=vs_base; register object *sup=base+VM35; VC35 vs_check; {object V226; object V227; V226=(base[0]); V227=(base[1]); vs_top=sup; goto TTL; TTL:; if((CMPcar((V226)))==(((object)VV[41]))){ goto T763;} base[2]= Cnil; vs_top=(vs_base=base+2)+1; return; goto T763; T763:; {object V22...
false
false
false
false
false
0
gst_uri_decode_bin_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstURIDecodeBin *dec = GST_URI_DECODE_BIN (object); switch (prop_id) { case PROP_URI: GST_OBJECT_LOCK (dec); g_free (dec->uri); dec->uri = g_value_dup_string (value); GST_OB...
false
false
false
false
false
0
statistics() { if( m_statsStore ) return m_statsStore; return Meta::Track::statistics(); }
false
false
false
false
false
0
IoBigNum_scan1(IoBigNum * self, IoObject * locals, IoMessage * m) { IoObject *other = IoMessage_locals_valueArgAt_(m, locals, 0); if (ISNUMBER(other)) return IONUMBER((long)mpz_scan1(DATA(self)->integer, IoNumber_asLong(other))); else IoState_error_(IOSTATE, m, "argument 0 to method '%s' must be a Number, not a ...
false
false
false
false
false
0
Set_Not(WamWord *exp, int result, WamWord *load_word) { if (result == 0) /* ~X is false */ return Get_Integer(1, exp[1]); if (result == 1) /* ~X is true */ return Get_Integer(0, exp[1]); /* ~X=B */ *load_word = Tag_REF(Fd_New_Bool_Variable()); BOOL_CSTR_2(not_x_eq_b, exp[1], *load_word); retur...
false
false
false
false
false
0
click_hook_open (ClickDB* db, const gchar* name, GError** error) { ClickHook* result = NULL; gchar* hook_path = NULL; gchar* _tmp0_ = NULL; gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; const gchar* _tmp3_ = NULL; gchar* _tmp4_ = NULL; gchar* _tmp5_ = NULL; gchar* _tmp6_ = NULL; gchar* _tmp7_ = NULL; GEr...
false
false
false
false
false
0
nm_setting_to_hash (NMSetting *setting, NMSettingHashFlags flags) { GHashTable *hash; GParamSpec **property_specs; guint n_property_specs; guint i; g_return_val_if_fail (setting != NULL, NULL); g_return_val_if_fail (NM_IS_SETTING (setting), NULL); property_specs = g_object_class_list_properties (G_OBJECT_GET_C...
false
false
false
true
false
1