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
out( MifOutputByteStream &os ) { os << '\n' << MifOutputByteStream::INDENT << "<PolyLine "; os.indent(); outObjectProperties( os ); CHECK_PROPERTY( HeadCap ); CHECK_PROPERTY( TailCap ); for( size_t i = 0; i < Points.size(); i++ ) os << '\n' << MifOutputByteStream::INDENT << "<Point " <<...
false
false
false
false
false
0
lyxRead(Lexer & lex, FontInfo const & fi) { FontInfo f = fi; bool error = false; bool finished = false; while (!finished && lex.isOK() && !error) { lex.next(); string const tok = ascii_lowercase(lex.getString()); if (tok.empty()) { continue; } else if (tok == "endfont") { finished = true; } else if...
false
false
false
false
false
0
setup_stdio() { if (fd_read!=-1 || fd_write!=-1) { MAKE_WARNING(NO_MORE_IO); return false; } setup_stdin(); setup_stdout(); return true; }
false
false
false
false
false
0
search_oneatatime(struct searchinfo *si, unsigned long i, struct searchinfo *sihead, const char *charset, int isuid, void (*callback_func)(struct searchinfo *, struct searchinfo *, int, unsigned long, void *), void *voidarg) { struct searchinfo *p; struct...
false
false
false
false
true
1
ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf) { struct ata_device *dev = args->dev; u64 last_lba = dev->n_sectors - 1; /* LBA of the last block */ u32 sector_size; /* physical sector size in bytes */ u8 log2_per_phys; u16 lowest_aligned; sector_size = ata_id_logical_sector_size(dev->id); log2_per_ph...
false
false
false
false
false
0
trans(int c) { static char buf[] = "\\x0000"; static char hex[] = "0123456789abcdef"; switch(c) { case '\b': return "\\b"; case '\n': return "\\n"; case '\r': return "\\r"; case '\t': return "\\t"; case '\\': return "\\\\"; } buf[2] = hex[(c>>12)&0xF]; buf[3] = hex[(c>>8)&0xF]; buf[4] =...
false
false
false
false
false
0
ctt_str_to_pdu(char* value, dchat_pdu_t* pdu) { int found = 0; dchat_content_types_t ctt; if (init_dchat_content_types(&ctt) == -1) { return -1; } for (int i = 0; i < CTT_AMOUNT; i++) { if (!strcmp(value, ctt.type[i].ctt_name)) { pdu->content_type = ctt....
false
false
false
false
false
0
SHPOpenDiskTree( const char* pszQIXFilename, SAHooks *psHooks ) { SHPTreeDiskHandle hDiskTree; hDiskTree = (SHPTreeDiskHandle) calloc(sizeof(struct SHPDiskTreeInfo),1); if (psHooks == NULL) SASetupDefaultHooks( &(hDiskTree->sHooks) ); else memcpy( &(h...
false
false
false
false
false
0
fdUpdateBiggest(int fd, int opening) { if (fd < Biggest_FD) return; assert(fd < Squid_MaxFD); if (fd > Biggest_FD) { /* * assert that we are not closing a FD bigger than * our known biggest FD */ assert(opening); Biggest_FD = fd; return; } /* if we are here, then fd == Biggest_FD */ /...
false
false
false
false
true
1
stacks_with(item rhs) { bool stacks = (type == rhs.type && damage == rhs.damage && active == rhs.active && charges == rhs.charges && contents.size() == rhs.contents.size() && (!goes_bad() || bday == rhs.bday)); if ((corpse == NULL && rhs.corpse != NULL) || (...
false
false
false
false
false
0
hash_corrupted(HTAB *hashp) { /* * If the corruption is in a shared hashtable, we'd better force a * systemwide restart. Otherwise, just shut down this one backend. */ if (hashp->isshared) elog(PANIC, "hash table \"%s\" corrupted", hashp->tabname); else elog(FATAL, "hash table \"%s\" corrupted", hashp->tab...
false
false
false
false
false
0
allot_array_1(CELL obj) { REGISTER_ROOT(obj); F_ARRAY *a = allot_array_internal(ARRAY_TYPE,1); UNREGISTER_ROOT(obj); set_array_nth(a,0,obj); return tag_object(a); }
false
false
false
false
false
0
uhc_ipp_extract(gnutella_node_t *n, const char *payload, int paylen, enum net_type type) { int i, cnt; int len = NET_TYPE_IPV6 == type ? 18 : 6; const void *p; g_assert(0 == paylen % len); cnt = paylen / len; if (GNET_PROPERTY(bootstrap_debug)) g_debug("extracting %d host%s in UDP IPP pong #%s from %s", ...
false
false
false
false
false
0
IoList_rawAtPut(IoList *self, int i, IoObject *v) { while (List_size(DATA(self)) < i) /* not efficient */ { List_append_(DATA(self), IONIL(self)); } List_at_put_(DATA(self), i, IOREF(v)); IoObject_isDirty_(self, 1); }
false
false
false
false
false
0
mwifiex_hscfg_write(struct file *file, const char __user *ubuf, size_t count, loff_t *ppos) { struct mwifiex_private *priv = (void *)file->private_data; unsigned long addr = get_zeroed_page(GFP_KERNEL); char *buf = (char *)addr; size_t buf_size = min_t(size_t, count, PAGE_SIZE - 1); int ret, arg_num; struct...
false
false
false
false
false
0
v4l2_match_dv_timings(const struct v4l2_dv_timings *t1, const struct v4l2_dv_timings *t2, unsigned pclock_delta) { if (t1->type != t2->type || t1->type != V4L2_DV_BT_656_1120) return false; if (t1->bt.width == t2->bt.width && t1->bt.height == t2->bt.height && t1->bt.interlaced == t2->bt.interl...
false
false
false
false
false
0
config() { /* get string variables */ if (!( (log_fname = getenv("log_file")) && (song_path = getenv("stimulus_path")) && (data_fname = getenv("data_file")) && (song[0] = getenv("stimulus1")) && (song[1] = getenv("stimulus2")) ) ) { fprintf(stderr,"Environment variables not set\n"); exit(1); } /* get nu...
false
false
false
false
false
0
zend_do_add_variable(znode *result, const znode *op1, const znode *op2 TSRMLS_DC) /* {{{ */ { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_ADD_VAR; if (op1) { SET_NODE(opline->op1, op1); SET_NODE(opline->result, op1); } else { SET_UNUSED(opline->op1); opline->result_...
false
false
false
false
false
0
hostaddr_expr_1() { try { // for error handling hostaddr_expr(); } catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { if( inputState->guessing == 0 ) { reportError(ex); recover(ex,_tokenSet_27); } else { throw; } } }
false
false
false
false
false
0
find_newline (const gchar *ptr, const gchar *end, const gchar **line_end) { while (ptr < end) { gunichar c; c = g_utf8_get_char (ptr); if (c == '\n') { /* That's it */ *line_end = g_utf8_next_char (ptr); return ptr; } else if (c == '\r') { gchar *next; ne...
false
false
false
false
false
0
gkm_ssh_private_key_get_attribute (GkmObject *base, GkmSession *session, CK_ATTRIBUTE_PTR attr) { GkmSshPrivateKey *self = GKM_SSH_PRIVATE_KEY (base); gchar *digest; CK_RV rv; switch (attr->type) { case CKA_LABEL: return gkm_attribute_set_string (attr, self->label); /* COMPAT: Previous versions of gnome-keyri...
false
false
false
false
false
0
read(void *buf, offile_off_t buflen) { if (status_.bad() || (current_ == NULL) || (buf == NULL)) return 0; unsigned char *target = OFstatic_cast(unsigned char *, buf); offile_off_t offset = 0; offile_off_t availBytes = 0; offile_off_t result = 0; do { // copy bytes from output buffer to user provided ...
false
false
false
false
false
0
nextTip() { if (m_tip == NULL) return; m_tip->setText(QString("<a href='tip' style='text-decoration:none; color:#2e94af;'>%1</a>").arg(TipsAndTricks::randomTip())); }
false
false
false
false
false
0
_free_filetxt_header(void *object) { filetxt_header_t *header = (filetxt_header_t *)object; if (header) { xfree(header->partition); #ifdef HAVE_BG xfree(header->blockid); #endif } }
false
false
false
false
false
0
gf_cfg_init(const char *file, Bool *new_cfg) { GF_Config *cfg; char szPath[GF_MAX_PATH]; if (new_cfg) *new_cfg = 0; if (file) { cfg = gf_cfg_new(NULL, file); /*force creation of a new config*/ if (!cfg) { FILE *fcfg = fopen(file, "wt"); if (fcfg) { fclose(fcfg); cfg = gf_cfg_new(...
false
false
false
false
false
0
aclLookupProxyAuthStart(aclCheck_t * checklist) { auth_user_request_t *auth_user_request; /* make sure someone created auth_user_request for us */ assert(checklist->auth_user_request != NULL); auth_user_request = checklist->auth_user_request; assert(authenticateValidateUser(auth_user_request)); ...
false
false
false
false
false
0
select_obstacles_on_tile(int x, int y) { int idx, a; for (a = 0; a < EditLevel()->map[y][x].glued_obstacles.size; a++) { idx = ((int *)(EditLevel()->map[y][x].glued_obstacles.arr))[a]; if (!element_in_selection(&EditLevel()->obstacle_list[idx])) { add_object_to_list(&selected_elements, &EditLevel()->obstacle_li...
false
false
false
false
false
0
add_trace_hashed (CallContext *traces, int size, BackTrace *bt, uint64_t value) { int i; unsigned int start_pos; start_pos = bt->hash % size; i = start_pos; do { if (traces [i].bt == bt) { traces [i].count += value; return 0; } else if (!traces [i].bt) { traces [i].bt = bt; traces [i].count += valu...
false
false
false
false
false
0
recruit_jobless_worker(Firm* destFirmPtr, int preferedRaceId) { #define MIN_AI_TOWN_POP 8 int needSpecificRace, raceId; // the race of the needed unit if( preferedRaceId ) { raceId = preferedRaceId; needSpecificRace = 1; } else { if( destFirmPtr->firm_id == FIRM_BASE ) // for seat of power, th...
false
false
false
false
false
0
graph_open_window(const char *title, const char *geometry, REAL *world, MESH *mesh) { FUNCNAME("graph_open_window"); switch(mesh->dim) { #if DIM_OF_WORLD == 1 case 1: return graph_open_window_1d(title, geometry, world, mesh); #endif #if DIM_OF_WORLD == 2 case 2: return graph_open_window_2d(...
false
false
false
false
false
0
iterate_fix_dominators (dom, bbs, n) dominance_info dom; basic_block *bbs; int n; { int i, changed = 1; basic_block old_dom, new_dom; while (changed) { changed = 0; for (i = 0; i < n; i++) { old_dom = get_immediate_dominator (dom, bbs[i]); new_dom = recount_dominator (dom, b...
false
false
false
false
false
0
update_loyalty() { if( firm_res[firm_id]->live_in_town ) // only for those who do not live in town return; //----- update loyalty of the soldiers -----// Worker* workerPtr = worker_array; for( int i=0 ; i<worker_count ; i++, workerPtr++ ) { int targetLoyalty = workerPtr->target_loyalty(firm_recno); if( ...
false
false
false
false
false
0
gs_job_scan(void) { if (slurmctld_conf.debug_flags & DEBUG_FLAG_GANG) info("gang: entering gs_job_scan"); pthread_mutex_lock(&data_mutex); _scan_slurm_job_list(); pthread_mutex_unlock(&data_mutex); _preempt_job_dequeue(); /* MUST BE OUTSIDE OF data_mutex lock */ if (slurmctld_conf.debug_flags & DEBUG_FLAG_GANG...
false
false
false
false
false
0
read(char* s, std::streamsize n) { #ifdef BOOST_IOSTREAMS_WINDOWS DWORD result; if (!::ReadFile(handle_, s, n, &result, NULL)) { // report EOF if the write-side of a pipe has been closed if (GetLastError() == ERROR_BROKEN_PIPE) { result = 0; } else ...
false
false
false
false
false
0
wm_adsp1_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec); struct wm_adsp *dsp = &dsps[w->shift]; struct wm_adsp_alg_region *alg_region; struct wm_coeff_ct...
false
false
false
false
false
0
au_qu_hdy (init_data, detected, easter, year, hd_elems, fday, count) Bool *init_data; const Bool detected; int easter; const int year; int *hd_elems; const int fday; const int count; /* Manages all specific holidays celebrated in Australia/Queensland. */ { register int day; reg...
false
false
false
false
false
0
hyperexp_complete_gradient(double *p, int np, void *dptr, double *dp) { struct hyperexp_data *data = (struct hyperexp_data *) dptr; ESL_HYPEREXP *h = data->h; double pdf; int i,k; int pidx; hyperexp_unpack_paramvector(p, np, h); esl_vec_DSet(dp, np, 0.); for (i = 0; i < data->n; i++) ...
false
false
false
false
false
0
reset_ep_state(struct htc_target *target) { struct htc_endpoint *endpoint; int i; for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) { endpoint = &target->endpoint[i]; memset(&endpoint->cred_dist, 0, sizeof(endpoint->cred_dist)); endpoint->svc_id = 0; endpoint->len_max = 0; endpoint->max_txq_depth = 0; memset(...
false
false
false
false
false
0
EvaluateNE(IODSCellEvaluator* poEvaluator) { CPLAssert( eNodeType == SNT_OPERATION ); CPLAssert( eOp == ODS_NE ); eOp = ODS_EQ; if (!EvaluateEQ(poEvaluator)) return FALSE; int_value = !int_value; return TRUE; }
false
false
false
false
false
0
mark_beginning_as_normal (mach) register int mach; { switch (state_type[mach]) { case STATE_NORMAL: /* Oh, we've already visited here. */ return; case STATE_TRAILING_CONTEXT: state_type[mach] = STATE_NORMAL; if (transchar[mach] == SYM_EPSILON) { if (trans1[mach] != NO_TRANSITION) mark_beginning...
false
false
false
false
false
0
aim_send_login(aim_session_t *sess, aim_conn_t *conn, const char *sn, const char *password, struct client_info_s *ci, const char *key) { aim_frame_t *fr; aim_tlvlist_t *tl = NULL; fu8_t digest[16]; aim_snacid_t snacid; if (!ci || !sn || !password) return -EINVAL; /* * What the XORLOGIN flag _really_ means...
false
false
false
false
false
0
get_mixer_info(int dev, void __user *arg) { mixer_info info; memset(&info, 0, sizeof(info)); strlcpy(info.id, mixer_devs[dev]->id, sizeof(info.id)); strlcpy(info.name, mixer_devs[dev]->name, sizeof(info.name)); info.modify_counter = mixer_devs[dev]->modify_counter; if (__copy_to_user(arg, &info, sizeof(info))) ...
false
false
false
false
false
0
Clp_NewParser(int argc, const char * const *argv, int nopt, const Clp_Option *opt) { Clp_Parser *clp = (Clp_Parser *)malloc(sizeof(Clp_Parser)); Clp_Internal *cli = (Clp_Internal *)malloc(sizeof(Clp_Internal)); Clp_InternOption *iopt = (Clp_InternOption *)malloc(sizeof(Clp_InternOption) * nopt); if (cli...
false
true
false
false
false
1
doAutoCorr(gdouble** Dipole, gdouble* X, gint M) { int m,n,j; for (m = 0; m < M; m++) X[m] = 0.0; /* This algorithm was adapted from the formulas given in J. Kohanoff Comp. Mat. Sci. 2 221-232 (1994). The estimator formulation used here is unbiased and statistically consistent, Looping through all time or...
false
false
false
false
false
0
process_delete(unsigned char *cp, size_t len) { struct isakmp_delete *hdr = (struct isakmp_delete *) cp; char *msg; char *hex_spi; unsigned char *delete_spi; size_t spi_len; if (len < sizeof(struct isakmp_delete) || ntohs(hdr->isad_length) < sizeof(struct isakmp_delete)) return make_mes...
false
false
false
false
false
0
mei_me_hw_ready_wait(struct mei_device *dev) { mutex_unlock(&dev->device_lock); wait_event_timeout(dev->wait_hw_ready, dev->recvd_hw_ready, mei_secs_to_jiffies(MEI_HW_READY_TIMEOUT)); mutex_lock(&dev->device_lock); if (!dev->recvd_hw_ready) { dev_err(dev->dev, "wait hw ready failed\n"); return -ETIME; } ...
false
false
false
false
false
0
start_test_context (CutStreamParserPrivate *priv, GMarkupParseContext *context, const gchar *element_name, GError **error) { if (g_str_equal("test-suite", element_name)) { CutTestSuite *test_suite; PUSH_STATE(priv, IN_TEST_SUITE); test_suite = cut_test_suite_new_empty();...
false
false
false
false
false
0
snd_usb_caiaq_ep4_reply_dispatch(struct urb *urb) { struct snd_usb_caiaqdev *cdev = urb->context; unsigned char *buf = urb->transfer_buffer; struct device *dev = &urb->dev->dev; int ret; if (urb->status || !cdev || urb != cdev->ep4_in_urb) return; switch (cdev->chip.usb_id) { case USB_ID(USB_VID_NATIVEINSTRU...
false
false
false
false
false
0
isValid(const QVariant& value) const { if (value.canConvert(QVariant::Bool)) { QString str(value.toString()); return (str == "true" || str == "false"); } return false; }
false
false
false
false
false
0
reset_trig_time() { if (!auto_rate) auto_rate = 1; auto_trig_time = mnow() + 300 / (1 + auto_rate); }
false
false
false
false
false
0
balance_need_close(struct btrfs_fs_info *fs_info) { /* cancel requested || normal exit path */ return atomic_read(&fs_info->balance_cancel_req) || (atomic_read(&fs_info->balance_pause_req) == 0 && atomic_read(&fs_info->balance_cancel_req) == 0); }
false
false
false
false
false
0
_gwy_scratch_buffer_ensure(gdouble *buffer, guint n) { _GwyScratchBuffer *buf; if (buffer) { buf = _GWY_SCRATCH_BUFFER_GET(buffer); if (n <= buf->head.info.alloc_len) return buffer; _gwy_scratch_buffer_free_backend(buf, buf->head.info.alloc_len); } n = _GWY_SCRATCH...
false
false
false
false
false
0
globus_hashtable_copy( globus_hashtable_t * dest_table, globus_hashtable_t * src_table, globus_hashtable_copy_func_t copy_func) { globus_l_hashtable_t * src_itable; globus_l_hashtable_t * dest_itable; int ...
false
false
false
false
false
0
nvkm_perfmon_child_get(struct nvkm_object *object, int index, struct nvkm_oclass *oclass) { if (index == 0) { oclass->base.oclass = NVIF_IOCTL_NEW_V0_PERFDOM; oclass->base.minver = 0; oclass->base.maxver = 0; oclass->ctor = nvkm_perfmon_child_new; return 0; } return -EINVAL; }
false
false
false
false
false
0
border_draw_title_deep( FvwmWindow *fw, titlebar_descr *td, title_draw_descr *tdd, FlocaleWinString *fstr, Pixmap dest_pix, Window w) { DecorFace *df; pixmap_background_type bg; bg.flags.use_pixmap = 0; for (df = tdd->df; df != NULL; df = df->next) { if (df->style.face_type == MultiPixmap) { border_mp_dr...
false
false
false
false
false
0
decode_level0_header(LHAFileHeader **header, LHAInputStream *stream) { uint8_t header_len; uint8_t header_csum; size_t path_len; size_t min_len; header_len = RAW_DATA(header, 0); header_csum = RAW_DATA(header, 1); // Sanity check header length. This is the minimum header length // for a header that has a zer...
false
true
false
false
false
1
rb_ary_pop(VALUE ary) { long n; rb_ary_modify_check(ary); if (RARRAY_LEN(ary) == 0) return Qnil; if (ARY_OWNS_HEAP_P(ary) && RARRAY_LEN(ary) * 3 < ARY_CAPA(ary) && ARY_CAPA(ary) > ARY_DEFAULT_SIZE) { ary_resize_capa(ary, RARRAY_LEN(ary) * 2); } n = RARRAY_LEN(ary)-1; ARY_SET_LEN(ary, ...
false
false
false
false
false
0
save_preference() { gchar filename[512]; xmlDoc *doc; xmlNode *xpreference; gint items; gint i; gchar buff[512]; LOG(LOG_DEBUG, "IN : save_preference()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_PREFERENCE); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup(...
false
true
true
false
false
1
da903x_set_voltage_sel(struct regulator_dev *rdev, unsigned selector) { struct da903x_regulator_info *info = rdev_get_drvdata(rdev); struct device *da9034_dev = to_da903x_dev(rdev); uint8_t val, mask; if (rdev->desc->n_voltages == 1) return -EINVAL; val = selector << info->vol_shift; mask = ((1 << info->vol_n...
false
false
false
false
false
0
read_gabedit_orbitals(gchar* FileName) { gint i; gint typefile; gint typebasis; gboolean OkAlpha = FALSE; gboolean OkBeta = FALSE; gchar* t = NULL; typefile =get_type_file_orb(FileName); if(typefile==GABEDIT_TYPEFILE_UNKNOWN) return; if(typefile != GABEDIT_TYPEFILE_GABEDIT) { Message(_("Sorry, This fil...
false
false
false
false
false
0
pg_identify(struct pg *dev, int log) { int s; char *ms[2] = { "master", "slave" }; char mf[10], id[18]; char id_cmd[12] = { ATAPI_IDENTIFY, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0 }; char buf[36]; s = pg_command(dev, id_cmd, 36, jiffies + PG_TMO); if (s) return -1; s = pg_completion(dev, buf, jiffies + PG_TMO); if...
false
false
false
false
false
0
pageDone(u_int ppm, u_int& ppr) { static char ppmCodes[3] = { 0x2C, 0x3B, 0x2E }; char eop[2]; if (ppm == PPH_SKIP) { ppr = PPR_MCF; return true; } eop[0] = DLE; eop[1] = ppmCodes[ppm]; ppr = 0; // something invalid if (putModemData(eop, sizeof (eop))) { ...
false
false
false
false
false
0
gee_tree_set_fix_removal (GeeTreeSet* self, GeeTreeSetNode** node, gpointer* key) { gpointer _vala_key = NULL; GeeTreeSetNode* n = NULL; GeeTreeSetNode* _tmp0_ = NULL; GeeTreeSetNode* _tmp1_ = NULL; gpointer _tmp2_ = NULL; GeeTreeSetNode* _tmp3_ = NULL; GeeTreeSetNode* _tmp4_ = NULL; GeeTreeSetNode* _tmp11_ = N...
false
false
false
false
false
0
ParseMethodNameAndIndex( void *theEnv, char *readSource, unsigned *theIndex) { SYMBOL_HN *gname; *theIndex = 0; gname = GetConstructNameAndComment(theEnv,readSource,&DefgenericData(theEnv)->GenericInputToken,"defgeneric", EnvFindDefgeneric,NULL,"&",TRUE,FALSE,TRUE...
false
false
false
false
false
0
ssl3_ComputeECDHKeyHash(SECOidTag hashAlg, SECItem ec_params, SECItem server_ecpoint, SSL3Random *client_rand, SSL3Random *server_rand, SSL3Hashes *hashes, PRBool bypassPKCS11) { PRUint8 * hashBuf; PRUint8 * pBuf; SECStatus ...
false
true
false
false
false
1
event_ReplaceAll(void) { UT_UCS4String findEntryText; UT_UCS4String replaceEntryText; findEntryText = get_combobox_text(m_comboFind); replaceEntryText = get_combobox_text(m_comboReplace); setFindString(findEntryText.ucs4_str()); setReplaceString(replaceEntryText.ucs4_str()); findReplaceAll(); }
false
false
false
false
false
0
ADD_u32(uint32_t a, uint32_t b) { /* overflow -> saturate */ uint64_t result = (uint64_t)a + b; return result < 0xffffffff ? (uint32_t)result : 0xffffffff; }
false
false
false
false
false
0
__disk_unblock_events(struct gendisk *disk, bool check_now) { struct disk_events *ev = disk->ev; unsigned long intv; unsigned long flags; spin_lock_irqsave(&ev->lock, flags); if (WARN_ON_ONCE(ev->block <= 0)) goto out_unlock; if (--ev->block) goto out_unlock; /* * Not exactly a latency critical operati...
false
false
false
false
false
0
xmalloc(int size) { void *ptr; ptr = malloc(size); if (ptr == NULL) { fprintf(stderr, _("\nMemory allocation error, exiting.\n")); exit(EXIT_FAILURE); } return ptr; }
false
false
false
false
false
0
IsCommentFiltered(const wxString& comment) { if (s_FilterComments) { wxStringTokenizer tokenizer( s_CommentFilterString, wxT(",") ); while (tokenizer.HasMoreTokens()) { if ( comment.Lower().Trim(false).Trim(true).Contains( tokenizer.GetNextToken().Lower().Trim(false).Trim(true))) { return true; } ...
false
false
false
false
false
0
flush(void) { if (input_offset) { if (output_fd >= 0) write_or_die(output_fd, input_buffer, input_offset); git_SHA1_Update(&input_ctx, input_buffer, input_offset); memmove(input_buffer, input_buffer + input_offset, input_len); input_offset = 0; } }
false
false
false
false
false
0
print_info(struct gfs2_sbd *sdp) { log_notice("FS: %-22s%s\n", _("Mount point:"), sdp->path_name); log_notice("FS: %-22s%s\n", _("Device:"), sdp->device_name); log_notice("FS: %-22s%llu (0x%llx)\n", _("Size:"), (unsigned long long)fssize, (unsigned long long)fssize); log_notice("FS: %-22s%u (0x%x)\n", _("Resou...
false
false
false
false
false
0
fmm_parse_magic_file(PerlFMM *state, char *file) { int ws_offset; int lineno; int errs; /* char line[BUFSIZ + 1];*/ PerlIO *fhandle; SV *err; SV *sv = sv_2mortal(newSV(BUFSIZ)); SV *PL_rs_orig = newSVsv(PL_rs); char *line; fhandle = PerlIO_open(file, "r"); if (! fhandl...
false
false
false
false
false
0
git_revwalk_new(git_revwalk **revwalk_out, git_repository *repo) { git_revwalk *walk; walk = git__malloc(sizeof(git_revwalk)); if (walk == NULL) return GIT_ENOMEM; memset(walk, 0x0, sizeof(git_revwalk)); walk->commits = git_hashtable_alloc(64, object_table_hash, (git_hash_keyeq_ptr)git_oid_cmp); if (w...
false
false
false
false
false
0
add_to_partition_kill_list (temp_expr_table_p tab, int p, int ver) { if (!tab->kill_list[p]) { tab->kill_list[p] = BITMAP_ALLOC (NULL); bitmap_set_bit (tab->partition_in_use, p); } bitmap_set_bit (tab->kill_list[p], ver); }
false
false
false
false
false
0
ixgbe_free_fcoe_ddp_resources(struct ixgbe_adapter *adapter) { struct ixgbe_fcoe *fcoe = &adapter->fcoe; int cpu, i, ddp_max; /* do nothing if no DDP pools were allocated */ if (!fcoe->ddp_pool) return; ddp_max = IXGBE_FCOE_DDP_MAX; /* X550 has different DDP Max limit */ if (adapter->hw.mac.type == ixgbe_mac...
false
false
false
false
false
0
event_base_set(struct event_base *base, struct event *ev) { /* Only innocent events may be assigned to a different base */ if (ev->ev_flags != EVLIST_INIT) return (-1); _event_debug_assert_is_setup(ev); ev->ev_base = base; ev->ev_pri = base->nactivequeues/2; return (0); }
false
false
false
false
false
0
bricks_add_grow_mod( int x, int y, int id ) { BrickHit *hit; if ( cur_game->mod.brick_hit_count > MAX_MODS ) return; /* drop hit */ hit = &cur_game->mod.brick_hits[cur_game->mod.brick_hit_count++]; memset(hit,0,sizeof(BrickHit)); /* clear hit */ hit->x = x; hit->y = y; hit->brick_id = id; hit->type = HT_GR...
false
false
false
false
false
0
vnc_connection_has_auth_type(gpointer data) { VncConnection *conn = data; VncConnectionPrivate *priv = conn->priv; if (priv->has_error) return TRUE; if (priv->auth_type == VNC_CONNECTION_AUTH_INVALID) return FALSE; return TRUE; }
false
false
false
false
false
0
HTMLPreformatted(li, env, text, len) HTMLInfo li; HTMLEnv env; char *text; size_t len; { char *cp, *lastcp, *start; size_t ptlen; char *s; bool tabbed; lastcp = text + len; tabbed = false; for (ptlen = 0, start = cp = text; cp < lastcp; cp++) { if (*cp == '\r') continue; else if (*cp == '\n') ...
false
false
false
false
false
0
FactGetVarPN3( void *theEnv, struct lhsParseNode *theNode) { struct factGetVarPN3Call hack; /*===================================================*/ /* Clear the bitmap for storing the argument values. */ /*===================================================*/ ClearBitString(&hack,sizeof(struct fa...
false
false
false
false
false
0
gtk_xtext_strip_color (unsigned char *text, int len, unsigned char *outbuf, int *newlen, int *mb_ret, GSList **slp, int strip_hidden) { int i = 0; int rcol = 0, bgcol = 0; int hidden = FALSE; unsigned char *new_str; int mb = FALSE; GSList *sl = NULL; unsigned char *text0 = text; int off1, len1; offlen...
false
false
false
false
false
0
b43_nphy_get_tx_gain_table(struct b43_wldev *dev) { struct b43_phy *phy = &dev->phy; enum ieee80211_band band = b43_current_band(dev->wl); struct ssb_sprom *sprom = dev->dev->bus_sprom; if (dev->phy.rev < 3) return b43_ntab_tx_gain_rev0_1_2; /* rev 3+ */ if ((dev->phy.n->ipa2g_on && band == IEEE80211_BAND_2GH...
false
false
false
false
false
0
exynos_adc_v2_init_hw(struct exynos_adc *info) { u32 con1, con2; if (info->data->needs_adc_phy) regmap_write(info->pmu_map, info->data->phy_offset, 1); con1 = ADC_V2_CON1_SOFT_RESET; writel(con1, ADC_V2_CON1(info->regs)); con2 = ADC_V2_CON2_OSEL | ADC_V2_CON2_ESEL | ADC_V2_CON2_HIGHF | ADC_V2_CON2_C_TIME(0)...
false
false
false
false
false
0
convert_hline_str4 (paintinfo * p, int y) { int i; guint8 *A = p->ap + y * p->ystride; guint8 *R = p->yp + y * p->ystride; guint8 *G = p->up + y * p->ustride; guint8 *B = p->vp + y * p->vstride; guint8 *argb = p->tmpline; for (i = 0; i < p->width; i++) { A[4 * i] = 0xff; R[4 * i] = argb[4 * i + 1...
false
false
false
false
false
0
node_remove (Node *node) { Node *tup = node->up, *tdown = node->down; /* if we're wiping the tree, add a temp node for later reference to the empty tree */ if ((node_left (node) == 0) && (node_up (node) == 0) && (node_down (node) == 0)) { Node *tnode = node_insert_down (node); node_setflag (tnode, F_temp, 1)...
false
false
false
false
false
0
xmlnode_get_attrib(xmlnode owner, const char *name) { xmlnode attrib; if (owner != NULL && owner->firstattrib != NULL) { attrib = _xmlnode_search(owner->firstattrib, name, NTYPE_ATTRIB); if (attrib != NULL) return (char *)attrib->data; } return NULL; }
false
false
false
false
false
0
ArgusPrintSrcBytes (char *buf, struct ArgusRecord *argus) { int src_bytes = 0; if (argus->ahdr.type & ARGUS_MAR) src_bytes = argus->argus_mar.bytesRcvd; else { if (Aflag) { src_bytes = argus->argus_far.src.appbytes; } else { src_bytes = argus->argus_far.src.bytes; } ...
false
false
false
false
false
0
xlog_recover_process_data( struct xlog *log, struct hlist_head rhash[], struct xlog_rec_header *rhead, char *dp, int pass) { struct xlog_op_header *ohead; char *end; int num_logops; int error; end = dp + be32_to_cpu(rhead->h_len); num_logops = be32_to_cpu(rhead->h_num_logops); /* check the log ...
false
false
false
false
false
0
UnpackString(const Buffer *b,int *offset,int limit,xstring *str_out) { if(limit-*offset<4) { // We unpack strings when we have already received complete packet, // so it is not possible to receive any more data. LogError(2,"bad string in reply (truncated length field)"); return UNPACK_WRON...
false
false
false
false
false
0
normalize() { if (idx() > lastidx()) { lyxerr << "this should not really happen - 1: " << idx() << ' ' << nargs() << " in: " << &inset() << endl; idx() = lastidx(); } if (pos() > lastpos()) { lyxerr << "this should not really happen - 2: " << pos() << ' ' << lastpos() << " in idx: " << i...
false
false
false
false
false
0
showbutton(int id) { pbutton pb; int c; char mss = getmousestatus(); if (mss == 2) mousevisible(false); pb = firstbutton; while (pb != NULL) { if (pb->id == id) if ( pb->pressed == 0) { c = pb->status; pb->status = 1; if...
false
false
false
false
false
0
session_setup_clone_command(void) { gint i; SmPropValue *vals = g_new(SmPropValue, sm_argc); SmProp prop = { .name = g_strdup(SmCloneCommand), .type = g_strdup(SmLISTofARRAY8), .num_vals = sm_argc, .vals = vals }; SmProp *list = &prop; ob_debug_type(OB_DEBUG_SM,...
false
false
false
false
false
0
do_blank_screen(int entering_gfx) { struct vc_data *vc = vc_cons[fg_console].d; int i; WARN_CONSOLE_UNLOCKED(); if (console_blanked) { if (blank_state == blank_vesa_wait) { blank_state = blank_off; vc->vc_sw->con_blank(vc, vesa_blank_mode + 1, 0); } return; } /* entering graphics mode? */ if (ente...
false
false
false
false
false
0
updatewindow(strm, end, copy) z_streamp strm; const Bytef *end; unsigned copy; { struct inflate_state FAR *state; unsigned dist; state = (struct inflate_state FAR *)strm->state; /* if it hasn't been done already, allocate space for the window */ if (state->window == Z_NULL) { state->window...
false
false
false
false
false
0
gsb_csv_export_sort_by_value_date_or_date ( gpointer transaction_pointer_1, gpointer transaction_pointer_2 ) { gint transaction_number_1; gint transaction_number_2; const GDate *value_date_1; const GDate *value_date_2; transaction_number_1 = gsb_data_transaction_get_transac...
false
false
false
false
false
0
rank1(const size_t i) const { if(i>=length) return (size_t)-1; if(ones==0) return 0; if(ones==length) return i+1; size_t ini = 1; size_t fin = ones; while(ini<fin) { size_t pos = (ini+fin)/2; size_t bp = select1(pos); if(bp==i) retu...
false
false
false
false
false
0
status_open(struct view *view) { reset_view(view); add_line_data(view, NULL, LINE_STAT_HEAD); status_update_onbranch(); io_run_bg(update_index_argv); if (is_initial_commit()) { if (!status_run(view, status_list_no_head_argv, 'A', LINE_STAT_STAGED)) return FALSE; } else if (!status_run(view, status_diff_in...
false
false
false
false
false
0
askEmbedOrSave(int flags) { if (d->autoEmbedMimeType(flags)) return Embed; // don't use KStandardGuiItem::open() here which has trailing ellipsis! d->setButtonGuiItem(BrowserOpenOrSaveQuestionPrivate::OpenDefault, KGuiItem(i18nc("@label:button", "&Open"), "document-open")); d->showButton(Browse...
false
false
false
false
false
0
mailpop3_top(mailpop3 * f, unsigned int indx, unsigned int count, char ** result, size_t * result_len) { char command[POP3_STRING_SIZE]; struct mailpop3_msg_info * msginfo; int r; if (f->pop3_state != POP3_STATE_TRANSACTION) return MAILPOP3_ERROR_BAD_STATE; msginfo = find_msg(f, indx); if (ms...
false
false
false
false
false
0