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
test_core_limit(void) { #ifdef RLIMIT_CORE struct rlimit rlim[1]; if (getrlimit(RLIMIT_CORE, rlim) < 0) error("Unable to get core limit"); else if (rlim->rlim_cur != RLIM_INFINITY) { rlim->rlim_cur /= 1024; /* bytes to KB */ if (rlim->rlim_cur < 2048) { verbose("Warning: Core limit is only %ld KB", (lon...
false
false
false
false
false
0
process_x3f(FILE *inptr,struct fileheader *header,unsigned long fileoffset_base, struct image_summary *summary_entry, char *parent_name,int level,int indent) { struct x3f_header *x3fheader; unsigned long max_offset = 0UL; unsign...
false
false
false
false
false
0
usbvision_init_isoc(struct usb_usbvision *usbvision) { struct usb_device *dev = usbvision->dev; int buf_idx, err_code, reg_value; int sb_size; if (!USBVISION_IS_OPERATIONAL(usbvision)) return -EFAULT; usbvision->cur_frame = NULL; scratch_reset(usbvision); /* Alternate interface 1 is is the biggest frame siz...
false
false
false
false
false
0
bnx2x_dcbx_init(struct bnx2x *bp, bool update_shmem) { u32 dcbx_lldp_params_offset = SHMEM_LLDP_DCBX_PARAMS_NONE; /* only PMF can send ADMIN msg to MFW in old MFW versions */ if ((!bp->port.pmf) && (!(bp->flags & BC_SUPPORTS_DCBX_MSG_NON_PMF))) return; if (bp->dcbx_enabled <= 0) return; /* validate: * chi...
false
false
false
false
false
0
cancel_cb (GFileInfo *file_info, RecursiveOperation *operation) { GrlFilesystemSource *fs_source; if (operation->on_file_data) { GrlSourceSearchSpec *ss = (GrlSourceSearchSpec *) operation->on_file_data; fs_source = GRL_FILESYSTEM_SOURCE (ss->source); g_hash_table_remove (fs_source->priv->cancell...
false
false
false
false
false
0
intel_pstate_verify_policy(struct cpufreq_policy *policy) { cpufreq_verify_within_cpu_limits(policy); if (policy->policy != CPUFREQ_POLICY_POWERSAVE && policy->policy != CPUFREQ_POLICY_PERFORMANCE) return -EINVAL; return 0; }
false
false
false
false
false
0
batch_objects(int print_contents) { struct strbuf buf = STRBUF_INIT; while (strbuf_getline(&buf, stdin, '\n') != EOF) { int error = batch_one_object(buf.buf, print_contents); if (error) return error; } return 0; }
false
false
false
false
false
0
FuncSetOutput ( Obj self, Obj file, Obj append ) { if ( IsStringConv(file) ) { if ( append != False ) { if ( ! OpenAppend( CSTR_STRING(file) ) ) { ErrorQuit( "SetOutput: cannot open '%s' for appending", ...
false
false
false
false
false
0
ResolvePhis(HBasicBlock* block) { const ZoneList<HPhi*>* phis = block->phis(); for (int i = 0; i < phis->length(); ++i) { HPhi* phi = phis->at(i); LUnallocated* phi_operand = new LUnallocated(LUnallocated::NONE); phi_operand->set_virtual_register(phi->id()); for (int j = 0; j < phi->OperandCount(); ...
false
false
false
false
false
0
WXMPUtils_ComposeFieldSelector_1 ( XMP_StringPtr schemaNS, XMP_StringPtr arrayName, XMP_StringPtr fieldNS, XMP_StringPtr fieldName, XMP_StringPtr fieldValue, void * selPath, SetClientStringProc SetClientString, WXMP_Result *...
false
false
false
false
false
0
ast_rtp_codecs_get_payload_format(struct ast_rtp_codecs *codecs, int payload) { struct ast_rtp_payload_type *type; struct ast_format *format; if (payload < 0 || payload >= AST_RTP_MAX_PT) { return NULL; } if (!(type = ao2_find(codecs->payloads, &payload, OBJ_KEY | OBJ_NOLOCK))) { return NULL; } format = t...
false
false
false
false
false
0
worklist_editor_item_callback(struct widget *pWidget) { switch(Main.event.button.button) { case SDL_BUTTON_LEFT: swap_item_up_from_worklist(pWidget); break; case SDL_BUTTON_MIDDLE: remove_item_from_worklist(pWidget); break; case SDL_BUTTON_RIGHT: swap_item_down_from_worklist(...
false
false
false
false
false
0
con_set_trans_old(unsigned char __user * arg) { int i; unsigned short *p = translations[USER_MAP]; if (!access_ok(VERIFY_READ, arg, E_TABSZ)) return -EFAULT; console_lock(); for (i=0; i<E_TABSZ ; i++) { unsigned char uc; __get_user(uc, arg+i); p[i] = UNI_DIRECT_BASE | uc; } update_user_maps(); consol...
false
false
false
false
false
0
DoPara(dir) int dir; { register int num = arg_value(); bool first_time = YES; if (num < 0) { num = -num; dir = -dir; } while (--num >= 0) { tryagain: find_para(dir); /* find paragraph bounderies */ if (dir == BACKWARD && (!first_time || (para_head == curline && bolp()))) { if (bobp()) complain...
false
false
false
false
false
0
slurm_get_job_stdout(char *buf, int buf_size, job_info_t * job_ptr) { if (job_ptr == NULL) snprintf(buf, buf_size, "%s", "job pointer is NULL"); else if (job_ptr->std_out) _fname_format(buf, buf_size, job_ptr, job_ptr->std_out); else if (job_ptr->batch_flag == 0) snprintf(buf, buf_size, "%s", ""); else if (jo...
false
false
false
false
false
0
JVM_FindClassFromClassLoader(JNIEnv *env, const char *name, jboolean init, jobject loader, jboolean throw_error) { Class *class; TRACE("JVM_FindClassFromClassLoader(env=%p, name=%s, init=%d, loader=%p," " throw_error=%d)", env, n...
false
false
false
false
false
0
chomp(char *string) { int length = strlen(string) - 1; if(length >= 0 && string[length] == '\n') string[length] = '\0'; return length; }
false
false
false
false
false
0
node_sendqueue_size_changed(property_t unused_prop) { uint32 min = 1.5 * settings_max_msg_size(); (void) unused_prop; if (GNET_PROPERTY(node_sendqueue_size) < min) { gnet_prop_set_guint32_val(PROP_NODE_SENDQUEUE_SIZE, min); return TRUE; } return FALSE; }
false
false
false
false
false
0
TS_RESP_get_policy(TS_RESP_CTX *ctx) { ASN1_OBJECT *requested = TS_REQ_get_policy_id(ctx->request); ASN1_OBJECT *policy = NULL; int i; if (ctx->default_policy == NULL) { TSerr(TS_F_TS_RESP_GET_POLICY, TS_R_INVALID_NULL_POINTER); return NULL; } /* Return the default policy if none is requested or the defa...
false
false
false
false
false
0
build_chassis(ibnd_node_t * node, ibnd_chassis_t * chassis) { int p = 0; ibnd_node_t *remnode = 0; ibnd_port_t *port = 0; /* we get here with node = chassis_spine */ if (insert_spine(node, chassis)) return -1; /* loop: pass on all ports of node */ for (p = 1; p <= node->numports; p++) { port = node->ports...
false
false
false
false
false
0
get_spec_reg(regname, argp, allocated, errmsg) int regname; char_u **argp; int *allocated; /* return: TRUE when value was allocated */ int errmsg; /* give error message when failing */ { int cnt; *argp = NULL; *allocated = FALSE; switch (regname) { case '%': /* file name */ ...
false
false
false
false
false
0
ilLoadUtxF(ILHANDLE File) { ILuint FirstPos; ILboolean bRet; iSetInputFile(File); FirstPos = itell(); try { bRet = iLoadUtxInternal(); } catch (bad_alloc &e) { e; ilSetError(IL_OUT_OF_MEMORY); return IL_FALSE; } iseek(FirstPos, IL_SEEK_SET); return bRet; }
false
false
false
false
false
0
make_var_volatile (var) tree var; { if (GET_CODE (DECL_RTL (var)) != MEM) abort (); MEM_VOLATILE_P (DECL_RTL (var)) = 1; }
false
false
false
false
false
0
NewDataNode(PCFFOLDER_NODE FolderNode) /* * FUNCTION: Creates a new data block node * ARGUMENTS: * FolderNode = Pointer to folder node to bind data block to * RETURNS: * Pointer to node if there was enough free memory available, otherwise NULL */ { PCFDATA_NODE Node; Node = (PCFDATA_NODE)Allocate...
false
false
false
false
false
0
GetKeyValue2(int iRowIndex) { CTransfer* transfer; if (GetTransferCacheAtIndex(transfer, m_iSortedIndexes[iRowIndex])) { return wxEmptyString; } return transfer->m_strProjectURL; }
false
false
false
false
false
0
yam_cleanup_driver(void) { struct yam_mcs *p; int i; del_timer_sync(&yam_timer); for (i = 0; i < NR_PORTS; i++) { struct net_device *dev = yam_devs[i]; if (dev) { unregister_netdev(dev); free_netdev(dev); } } while (yam_data) { p = yam_data; yam_data = yam_data->next; kfree(p); } remove_pro...
false
false
false
false
false
0
text_property_to_utf8 (Display *display, const XTextProperty *prop) { GdkDisplay *gdkdisplay; char **list; int count; char *retval; list = NULL; gdkdisplay = _wnck_gdk_display_lookup_from_display (display); if (!gdkdisplay) return NULL; count = gdk_text_property...
false
false
false
false
false
0
P_DeathThink (player_t* player) { angle_t angle; angle_t delta; P_MovePsprites (player); // fall to the ground if (player->viewheight > 6*FRACUNIT) player->viewheight -= FRACUNIT; if (player->viewheight < 6*FRACUNIT) player->viewheight = 6*FRACUNIT; player->deltaviewheight = 0; ...
false
false
false
false
false
0
client3_1_mkdir (call_frame_t *frame, xlator_t *this, void *data) { clnt_local_t *local = NULL; clnt_conf_t *conf = NULL; clnt_args_t *args = NULL; gfs3_mkdir_req req = {{0,},}; int ret = 0; int op_err...
false
true
false
true
true
1
brasero_cdrdao_set_argv_common_rec (BraseroCdrdao *cdrdao, GPtrArray *argv) { BraseroBurnFlag flags; gchar *speed_str; guint speed; brasero_job_get_flags (BRASERO_JOB (cdrdao), &flags); if (flags & BRASERO_BURN_FLAG_DUMMY) g_ptr_array_add (argv, g_strdup ("--simulate")); g_ptr_array_add (argv, g_strdu...
false
false
false
false
false
0
d_def_17_( fortint * outputArray, unsigned char * gribSection1, fortint * bitPointer) { /* // Decodes ECMWF local definition 17 (from byte 41 onwards) from // gribSection1 into integer array values in outputArray. // // inputArray[0] corresponds to KSEC1(37) in the description at // http://www.ecmwf.int/publicati...
false
false
false
false
false
0
find_leader_in_sets (unsigned int val, bitmap_set_t set1, bitmap_set_t set2) { pre_expr result; result = bitmap_find_leader (set1, val, NULL); if (!result && set2) result = bitmap_find_leader (set2, val, NULL); return result; }
false
false
false
false
false
0
release(){ if(options&BITMAP_OWNED){ options&=~BITMAP_OWNED; FXFREE(&data); } data=NULL; }
false
false
false
false
false
0
long_label()const { //incomplete(); std::string buffer(short_label()); //for (const CKT_BASE* brh = owner(); exists(brh); brh = brh->owner()) { // buffer += '.' + brh->short_label(); //} return buffer; }
false
false
false
false
false
0
GC_try_to_collect_general(GC_stop_func stop_func, GC_bool force_unmap) { GC_bool result; # ifdef USE_MUNMAP int old_unmap_threshold; # endif IF_CANCEL(int cancel_state;) DCL_LOCK_STATE; if (!GC_is_initialized) GC_init(); if (GC_debugging_started) G...
false
false
false
false
false
0
Init() { m_lastsearchtime = 0; lastpurgetime = ::GetTickCount(); m_paused = false; m_stopped = false; m_insufficient = false; status = PS_EMPTY; transferred = 0; m_iLastPausePurge = time(NULL); if(thePrefs::GetNewAutoDown()) { m_iDownPriority = PR_HIGH; m_bAutoDownPriority = true; } else { m_iDownP...
false
false
false
false
false
0
max8997_set_voltage_safeout_sel(struct regulator_dev *rdev, unsigned selector) { struct max8997_data *max8997 = rdev_get_drvdata(rdev); struct i2c_client *i2c = max8997->iodev->i2c; int rid = rdev_get_id(rdev); int reg, shift = 0, mask, ret; if (rid != MAX8997_ESAFEOUT1 && rid != MAX8997_ESAFEOUT2) retu...
false
false
false
false
false
0
S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, const char *meth) { dVAR; SV* ret; PERL_ARGS_ASSERT_MAGIC_METHPACK; ret = magic_methcall1(sv, mg, meth, 0, 1, NULL); if (ret) sv_setsv(sv, ret); return 0; }
false
false
false
false
false
0
ext4_invalidatepage(struct page *page, unsigned int offset, unsigned int length) { trace_ext4_invalidatepage(page, offset, length); /* No journalling happens on data buffers when this function is used */ WARN_ON(page_has_buffers(page) && buffer_jbd(page_buffers(page))); block_invalidatepage(page, offset, leng...
false
false
false
false
false
0
isl_set_substitute(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs) { int i; if (set && isl_set_plain_is_empty(set)) return set; set = isl_set_cow(set); if (!set || !subs) goto error; for (i = set->n - 1; i >= 0; --i) { set->p[i] = isl_basic_set_substitute(set->p[i...
false
false
false
false
false
0
create(RefToken tok) { // cout << "create( tok="<< tok->getType() << ", " << tok->getText() << ")" << nodeFactories.size() << endl; RefAST t = nodeFactories[tok->getType()]->second(); t->initialize(tok); return t; }
false
false
false
false
false
0
HandleXMLChild(const wxChar *tag) { if (wxStrcmp(tag, wxT("controlpoint"))) return NULL; return AddPointAtEnd(0,0); }
false
false
false
false
false
0
return_handler2(struct kretprobe_instance *ri, struct pt_regs *regs) { unsigned long ret = regs_return_value(regs); if (ret != (rand1 / div_factor) + 1) { handler_errors++; pr_err("incorrect value in kretprobe handler2\n"); } if (krph_val == 0) { handler_errors++; pr_err("call to kretprobe entry handler fa...
false
false
false
false
false
0
polkit_backend_interactive_authority_revoke_temporary_authorizations (PolkitBackendAuthority *authority, PolkitSubject *caller, PolkitSubject *subject, ...
false
false
false
false
false
0
immnum_signum(object x) { ufixnum ux=(ufixnum)x,uz=((ufixnum)({register fixnum _q1=(0);register object _q4; _q4=(!(((_q1)+(0x4000000000000000>>1))&-0x4000000000000000)) ? ((object)((_q1)+(0x8000000000000000 +(0x4000000000000000>>1)))) : make_fixnum1(_q1);_q4;})); return (((ufixnum)(x))>=0x8000000000000000) ? (ux<uz...
false
false
false
false
false
0
x509_process_extension(void *context, size_t hdrlen, unsigned char tag, const void *value, size_t vlen) { struct x509_parse_context *ctx = context; struct asymmetric_key_id *kid; const unsigned char *v = value; pr_debug("Extension: %u\n", ctx->last_oid); if (ctx->last_oid == OID_subjectKeyIdentifier)...
false
false
false
false
false
0
afr_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset, dict_t *xdata) { afr_private_t * priv = NULL; afr_local_t * local = NULL; call_frame_t *transaction_frame = NULL; int ret = -1; int op_errno = 0; VALIDATE_OR_GOTO (frame, out)...
false
false
false
false
false
0
qla4_82xx_wait_rom_done(struct scsi_qla_host *ha) { long timeout = 0; long done = 0 ; while (done == 0) { done = qla4_82xx_rd_32(ha, QLA82XX_ROMUSB_GLB_STATUS); done &= 2; timeout++; if (timeout >= rom_max_timeout) { printk("%s: Timeout reached waiting for rom done", DRIVER_NAME); return -1; }...
false
false
false
false
false
0
CDB___log_init(dbenv, dblp) DB_ENV *dbenv; DB_LOG *dblp; { LOG *region; int ret; void *p; if ((ret = CDB___db_shalloc(dblp->reginfo.addr, sizeof(*region), 0, &dblp->reginfo.primary)) != 0) return (ret); dblp->reginfo.rp->primary = R_OFFSET(&dblp->reginfo, dblp->reginfo.primary); region = dblp->regi...
false
false
false
false
false
0
bnx2x_setup_tc(struct net_device *dev, u8 num_tc) { struct bnx2x *bp = netdev_priv(dev); u8 c2s_map[BNX2X_MAX_PRIORITY], c2s_def; int cos, prio, count, offset; /* setup tc must be called under rtnl lock */ ASSERT_RTNL(); /* no traffic classes requested. Aborting */ if (!num_tc) { netdev_reset_tc(dev); retu...
false
false
false
false
false
0
ilSaveTargaF(ILHANDLE File) { ILuint Pos; iSetOutputFile(File); Pos = itellw(); if (iSaveTargaInternal() == IL_FALSE) return 0; // Error occurred return itellw() - Pos; // Return the number of bytes written. }
false
false
false
false
false
0
fs_hash_uri(const char *str) { uint64_t top; if (!str) { return 0; } if (strncmp(str, "bnode:b", 7) == 0) { fs_rid bnode_id = strtoll(str+7, NULL, 16); if (!bnode_id) { return FS_RID_GONE; } return FS_NUM_BNODE(bnode_id); } else if (strncmp(str, "_:b", 3) == 0) { fs_rid bnode_id ...
false
false
false
false
false
0
rg_analysis_track_result (RgAnalysisCtx * ctx, gdouble * gain, gdouble * peak) { gboolean result; g_return_val_if_fail (ctx != NULL, FALSE); accumulator_add (&ctx->album, &ctx->track); result = accumulator_result (&ctx->track, gain, peak); accumulator_clear (&ctx->track); reset_filters (ctx); reset_sil...
false
false
false
false
false
0
infer_handle_numerical_equal_bool(CdlTransaction transaction, CdlExpression expr, unsigned int lhs, unsigned int rhs, bool goal, int level) { CYG_REPORT_FUNCNAMETYPE("infer_handle_numerical_equal_bool", "result %d"); CYG_REPORT_FUNCARG4XV(transaction, expr, lhs, rhs); CYG_PRECONDITION_CLASSC(transaction); ...
false
false
false
false
false
0
mark_set_regs (struct propagate_block_info *pbi, rtx x, rtx insn) { rtx cond = NULL_RTX; rtx link; enum rtx_code code; int flags = pbi->flags; if (insn) for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) { if (REG_NOTE_KIND (link) == REG_INC) mark_set_1 (pbi, SET, XEXP (link, 0), ...
false
false
false
false
false
0
tms34010_host_r(int cpunum, int reg) { unsigned int addr; int result = 0; /* swap to the target cpu */ cpuintrf_push_context(cpunum); switch (reg) { /* upper 16 bits of the address */ case TMS34010_HOST_ADDRESS_H: result = IOREG(REG_HSTADRH); break; /* lower 16 bits of the address */...
false
false
false
false
false
0
WillCreateCycle(SUnit *SU, SUnit *TargetSU) { if (IsReachable(TargetSU, SU)) return true; for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); I != E; ++I) if (I->isAssignedRegDep() && IsReachable(TargetSU, I->getSUnit())) return true; return false; }
false
false
false
false
false
0
if_sdio_handle_event(struct if_sdio_card *card, u8 *buffer, unsigned size) { int ret; u32 event; lbs_deb_enter(LBS_DEB_SDIO); if (card->model == MODEL_8385) { event = sdio_readb(card->func, IF_SDIO_EVENT, &ret); if (ret) goto out; /* right shift 3 bits to get the event id */ event >>= 3; } else { ...
false
false
false
false
false
0
Distance (double x, double y, Item **item) const { list <Point>::const_iterator i = m_Points.begin (), end = m_Points.end (); if (i == end) return G_MAXDOUBLE; double x0 = (*i).x, y0 = (*i).y, x1, y1; double lw = GetLineWidth () / 2.; double result = G_MAXDOUBLE, d, dx, dy, dx1, dy1, xx, yy, length; // we do no...
false
false
false
false
false
0
Codes_codebyindex(int item) { coderec *c; int i = 0; if(item > Codes->num_codes) return NULL; for(c=Codes->codelist; c!=NULL; c=c->next) { i++; if(i == item) return c; } return NULL; }
false
false
false
false
false
0
g_select_device(int device) { g.devtype = device; if (g.dev != NULL) { delete g.dev; g.dev = NULL; } switch (device) { case GLE_DEVICE_PS: g.dev = new PSGLEDevice(false); break; case GLE_DEVICE_EPS: g.dev = new PSGLEDevice(true); break; case GLE_DEVICE_DUMMY: g.dev = new GLEDummyDevice(fals...
false
false
false
false
false
0
gimplify_must_not_throw_expr (tree *expr_p, gimple_seq *pre_p) { tree stmt = *expr_p; tree temp = voidify_wrapper_expr (stmt, NULL); tree body = TREE_OPERAND (stmt, 0); gimple_seq try_ = NULL; gimple_seq catch_ = NULL; gimple mnt; gimplify_and_add (body, &try_); mnt = gimple_build_eh_must_not_throw (te...
false
false
false
false
false
0
__db_vrfy_inpitem(dbp, h, pgno, i, is_btree, flags, himarkp, offsetp) DB *dbp; PAGE *h; db_pgno_t pgno; u_int32_t i; int is_btree; u_int32_t flags, *himarkp, *offsetp; { BKEYDATA *bk; ENV *env; db_indx_t *inp, offset, len; env = dbp->env; DB_ASSERT(env, himarkp != NULL); inp = P_INP(dbp, h); /* * Chec...
false
false
false
false
false
0
anlist_unparse( AttributeName *an, char *ptr, ber_len_t buflen ) { int comma = 0; char *start = ptr; for (; !BER_BVISNULL( &an->an_name ); an++) { /* if buflen == 0, assume the buffer size has been * already checked otherwise */ if ( buflen > 0 && buflen - ( ptr - start ) < comma + an->an_name.bv_len ) retu...
false
false
false
false
false
0
considerHoistingFromTo(BasicBlock &FromBlock, BasicBlock &ToBlock) { SmallSet<const Instruction *, 8> NotHoisted; const auto AllPrecedingUsesFromBlockHoisted = [&NotHoisted](User *U) { for (Value* V : U->operand_values()) { if (Instruction *I = dyn_cast<In...
false
false
false
false
false
0
mt7601u_mcu_msg_alloc(struct mt7601u_dev *dev, const void *data, int len) { struct sk_buff *skb; WARN_ON(len % 4); /* if length is not divisible by 4 we need to pad */ skb = alloc_skb(len + MT_DMA_HDR_LEN + 4, GFP_KERNEL); skb_reserve(skb, MT_DMA_HDR_LEN); memcpy(skb_put(skb, len), data, len); return skb; }
false
false
false
false
false
0
Sockname_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj * CONST objv[]) { #ifdef _WIN32 SOCKET sock; SOCKADDR_IN sockname; LPSOCKADDR pSockname = (LPSOCKADDR) &sockname; int size = sizeof(SOCKADDR_IN); #else int sock; struct sockaddr_in sockname; struct soc...
false
false
false
false
false
0
brd_zero_page(struct brd_device *brd, sector_t sector) { struct page *page; page = brd_lookup_page(brd, sector); if (page) clear_highpage(page); }
false
false
false
false
false
0
debris_init() { int i; if ( !Debris_inited ) { Debris_inited = 1; } Debris_model = -1; Debris_vaporize_model = -1; Debris_num_submodels = 0; // Reset everything between levels Num_debris_pieces = 0; for (i=0; i<MAX_DEBRIS_PIECES; i++ ) { Debris[i].flags = 0; Debris[i].sound_delay = 0; } Num_hul...
false
false
false
false
false
0
DateCalc_Date_to_Days(Z_int year, Z_int month, Z_int day) { boolean leap; if ((year >= 1) and (month >= 1) and (month <= 12) and (day >= 1) and (day <= DateCalc_Days_in_Month_[leap=DateCalc_leap_year(year)][month])) return( DateCalc_Year_to_Days(--year) + ...
false
false
false
false
false
0
idetape_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg) { struct ide_tape_obj *tape = ide_drv_g(bdev->bd_disk, ide_tape_obj); ide_drive_t *drive = tape->drive; int err; mutex_lock(&ide_tape_mutex); err = generic_ide_ioctl(drive, bdev, cmd, arg); if (err == -EINVAL) err = ...
false
false
false
false
false
0
dump_stmt(PLpgSQL_stmt *stmt) { printf("%3d:", stmt->lineno); switch (stmt->cmd_type) { case PLPGSQL_STMT_BLOCK: dump_block((PLpgSQL_stmt_block *) stmt); break; case PLPGSQL_STMT_ASSIGN: dump_assign((PLpgSQL_stmt_assign *) stmt); break; case PLPGSQL_STMT_IF: dump_if((PLpgSQL_stmt_if *) stmt); ...
false
false
false
false
false
0
nrrdIterSetOwnNrrd(NrrdIter *iter, Nrrd *nrrd) { if (iter && nrrd && nrrd->data) { if (nrrdTypeBlock == nrrd->type) { /* we can't deal */ nrrdIterSetValue(iter, AIR_NAN); return; } iter->nrrd = NULL; iter->ownNrrd = iter->ownNrrd ? nrrdNuke(iter->ownNrrd) : NULL; iter->ownNrrd =...
false
false
false
false
false
0
gedit_document_get_can_search_again (GeditDocument *doc) { g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE); return gtk_source_search_settings_get_search_text (doc->priv->deprecated_search_settings) != NULL; }
false
false
false
false
false
0
cps1_build_palette(void) { int offset; for (offset = 0; offset < cps1_palette_entries*16; offset++) { int palette = cps1_palette[offset]; if (palette != cps1_old_palette[offset]) { int red, green, blue, bright; if (cps_version == 2) { bright = 0x10 + (palette>>12); red ...
false
false
false
false
false
0
createKeyFrameImpl(Real time) { switch(mAnimationType) { default: case VAT_MORPH: return OGRE_NEW VertexMorphKeyFrame(this, time); case VAT_POSE: return OGRE_NEW VertexPoseKeyFrame(this, time); }; }
false
false
false
false
false
0
nilfs_attach_checkpoint(struct super_block *sb, __u64 cno, int curr_mnt, struct nilfs_root **rootp) { struct the_nilfs *nilfs = sb->s_fs_info; struct nilfs_root *root; struct nilfs_checkpoint *raw_cp; struct buffer_head *bh_cp; int err = -ENOMEM; root = nilfs_find_or_create_root( nilfs, curr_mnt ? NILFS...
false
false
false
false
false
0
freeEndNode(EndNode *endNode){ EndNode *tmp; tmp = endNode; while (tmp != NULL){ EndNode *next; next = tmp->nextEN; if (tmp->edit != NULL){ free(tmp->edit); } free(tmp); tmp = next; } }
false
false
false
false
false
0
saveGame (bool saveAs) { if (saveAs || m_gameURL.isEmpty()) { int result=0; KUrl url; do { url = KFileDialog::getSaveUrl (m_gameURL.url(), "*.kjc", m_view, 0); if (url.isEmpty()) return; // check filename QRegExp pattern ("*.kjc", Qt::CaseSensitive...
false
false
false
false
false
0
no_from_filter_header() { const char *p; static Buffer buf; from_filter= &no_from_filter_header; while ((p=NextLine()) && *p && *p != '\n' && isspace((unsigned char)*p)) current_line += p; buf=current_line; buf+='\0'; if (!p || *p == '\n') { from_filter= &read_blank; return (buf); } current_line=p; r...
false
false
false
false
false
0
GC_suspend_handler_inner(ptr_t sig_arg) { int sig = (int)(word)sig_arg; int dummy; pthread_t my_thread = pthread_self(); GC_thread me; # ifdef PARALLEL_MARK word my_mark_no = GC_mark_no; /* Marker can't proceed until we acknowledge. Thus this is */ /* guaranteed to be the mark_no correspending to ...
false
false
false
false
false
0
handle_ani_list(riff_tag_t *lst, enum res_e type, int isswapped) { riff_tag_t *rtp = lst+1; /* Skip the "LIST" tag */ while((char *)rtp < (char *)lst + lst->size + sizeof(*lst)) { if(!memcmp(rtp->tag, info, sizeof(info))) { rtp = SKIP_TAG(rtp,4); } else if(!memcmp(rtp->tag, inam, sizeof(inam))) { /*...
false
false
false
false
false
0
clutter_path_add_curve_to (ClutterPath *path, gint x_1, gint y_1, gint x_2, gint y_2, gint x_3, gint y_3) { ...
false
false
false
false
false
0
readFromStream(mrpt::utils::CStream &in,int version) { switch(version) { case 0: case 1: { readFromStreamRender(in); CVectorFloat x0,y0,z0,x1,y1,z1; in>>x0>>y0>>z0>>x1>>y1>>z1; if (version>=1) in>>mLineWidth; else mLineWidth=1; size_t N=x0.size(); mSegments.resize(N); for (size_t i=0;i<N;i...
false
false
false
false
false
0
fso_gsm_throwAppropriateError (FsoGsmConstantsAtResponse code, const gchar* detail, GError** error) { GError* _error_ = NULL; FsoGsmConstantsAtResponse _tmp0_ = 0; const gchar* _tmp1_ = NULL; GError* _tmp2_ = NULL; GError* _tmp3_ = NULL; GError * _inner_error_ = NULL; g_return_if_fail (detail != NULL); _tmp0_ =...
false
false
false
false
false
0
Message() const { ASSERT(isolate_ == i::Isolate::Current()); if (HasCaught() && message_ != i::Smi::FromInt(0)) { i::Object* message = reinterpret_cast<i::Object*>(message_); return v8::Utils::MessageToLocal(i::Handle<i::Object>(message, isolate_)); } else { return v8::Local<v8::Message>(); } }
false
false
false
false
false
0
restore_atime(const string & chemin, const inode * & ptr) { const file * ptr_f = dynamic_cast<const file *>(ptr); if(ptr_f != NULL) tools_noexcept_make_date(chemin, ptr_f->get_last_access(), ptr_f->get_last_modif()); }
false
false
false
false
false
0
gst_auto_convert_internal_src_query (GstPad * pad, GstQuery * query) { GstAutoConvert *autoconvert = GST_AUTO_CONVERT (g_object_get_qdata (G_OBJECT (pad), parent_quark)); GstPad *peerpad = gst_pad_get_peer (autoconvert->sinkpad); gboolean ret = FALSE; if (peerpad) { ret = gst_pad_query (pee...
false
false
false
false
false
0
layer_menu_update(ObMenuFrame *frame, gpointer data) { ObMenu *menu = frame->menu; GList *it; if (frame->client == NULL || !client_normal(frame->client)) return FALSE; /* don't show the menu */ for (it = menu->entries; it; it = g_list_next(it)) { ObMenuEntry *e = it->data; gboo...
false
false
false
false
false
0
SetInputField(const char* name, const char* fieldLoc) { if ( !name || !fieldLoc) { return; } int numAttr = vtkDataSetAttributes::NUM_ATTRIBUTES; int numFieldLocs = 3; int i; // Convert strings to ints and call the appropriate SetInputField() int attrType=-1; ...
false
false
false
false
false
0
clrmade(Node *n) { Arc *a; n->flags &= ~(CANPRETEND|PRETENDING); if(strchr(n->name, '(') ==0 || n->time) n->flags |= CANPRETEND; MADESET(n, NOTMADE); for(a = n->prereqs; a; a = a->next) if(a->n) clrmade(a->n); }
false
false
false
false
false
0
xgetgrnam(const char *name) { int i; if (!gtable) create_group_table(); for (i = 0; gtable[i].gr_name; i++) { if (!strcmp(name, gtable[i].gr_name)) return &(gtable[i]); } return NULL; }
false
false
false
false
false
0
HandleServerPLimitCommand(char* args) { if (*args) { char* param = ExtractLiteralArg(&args); if (!param) { return false; } int l = strlen(param); int val; if (strncmp(param, "player", l) == 0) { sWorld.SetPlayerLimit(-SEC_PLAYER); } else ...
false
false
false
false
false
0
_want_format(struct dmraid_format *fmt, const char *format, enum fmt_type type) { return fmt->format != type || (format && strncmp(format, fmt->name, strlen(format))) ? 0 : 1; }
false
true
false
false
true
1
dcookie_exit(void) { struct list_head * list; struct list_head * pos; struct list_head * pos2; struct dcookie_struct * dcs; size_t i; for (i = 0; i < hash_size; ++i) { list = dcookie_hashtable + i; list_for_each_safe(pos, pos2, list) { dcs = list_entry(pos, struct dcookie_struct, hash_list); list_del(&...
false
false
false
false
false
0
vfs_utimens (const gchar *path, const struct timespec tv [2]) { GFile *file; GError *error = NULL; gint result = 0; debug_print ("vfs_utimens: %s\n", path); file = file_from_full_path (path); if (file) { guint64 atime; guint32 atime_usec; guint64 mtime; guint32 mtime_usec...
false
false
false
false
false
0
ahc_linux_show_info(struct seq_file *m, struct Scsi_Host *shost) { struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; char ahc_info[256]; u_int max_targ; u_int i; seq_printf(m, "Adaptec AIC7xxx driver version: %s\n", AIC7XXX_DRIVER_VERSION); seq_printf(m, "%s\n", ahc->description); ahc_controlle...
false
false
false
false
false
0
slotEntriesFailed() { EntryLoader *loader = dynamic_cast<EntryLoader*>(sender()); delete loader; m_activefeeds--; emit signalEntriesFailed(); }
false
false
false
false
false
0
ajStrIsCharsetCaseS(const AjPStr str, const AjPStr str2) { char filter[256] = {'\0'}; /* should make all zero */ const char* cp; const char* cq; if(!str) return ajFalse; if(!str->Len) return ajFalse; if(!str2) return ajFalse; cq = str2->Ptr; while (*cq) { filter[tolo...
true
true
false
false
false
1
handle_connected (LightDMGreeter *greeter, guint8 *message, gsize message_length, gsize *offset) { LightDMGreeterPrivate *priv = GET_PRIVATE (greeter); gchar *version; GString *hint_string; int timeout; version = read_string (message, message_length, offset); hint_string = g_string_new (""); ...
false
false
false
false
false
0