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
gdl_dock_floating_configure_event_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) { GdlDock *dock; g_return_val_if_fail (user_data != NULL && GDL_IS_DOCK (user_data), TRUE); dock = GDL_DOCK (...
false
false
false
false
false
0
eel_remove_arg(int pos) { int i; eel_d_freestring(eel_args + pos); for(i = pos + 1; i < eel_arg_count; ++i) { eel_args[i-1] = eel_args[i]; eel_arg_tokens[i-1] = eel_arg_tokens[i]; } --eel_arg_count; }
false
false
false
false
false
0
updateGP2Source() { PinModule *pmGP2 = &(*m_gpio)[2]; if(option_reg->value.get() & OPTION_REG::T0CS) { printf("OPTION_REG::T0CS forcing GPIO2 as input, TRIS disabled\n"); pmGP2->setControl(m_IN_SignalControl); pmGP2->getPin().newGUIname("T0CS"); } else { cout << "TRIS now controlling gpio2\...
false
false
false
false
false
0
cik_enable_mgcg(struct radeon_device *rdev, bool enable) { u32 data, orig, tmp = 0; if (enable && (rdev->cg_flags & RADEON_CG_SUPPORT_GFX_MGCG)) { if (rdev->cg_flags & RADEON_CG_SUPPORT_GFX_MGLS) { if (rdev->cg_flags & RADEON_CG_SUPPORT_GFX_CP_LS) { orig = data = RREG32(CP_MEM_SLP_CNTL); data |= CP_MEM_...
false
false
false
false
false
0
copy_file_to_fd( pfs_file *file, int fd ) { pfs_ssize_t ractual, wactual, offset = 0; char buffer[BUFFER_SIZE]; while(1) { ractual = file->read(buffer,sizeof(buffer),offset); if(ractual<=0) return ractual; wactual = full_pwrite64(fd,buffer,ractual,offset); if(wactual>=0) { offset += wactual; } else { ...
false
false
false
false
false
0
single(int i, int j, int itype, int jtype, double rsq, double factor_coul, double factor_lj, double &fforce) { double r2inv,r,egamma,fgamma,prefactor; double fraction,table,forcecoul,phicoul; int itable; r2inv = 1.0/rsq; if (...
false
false
false
false
true
1
main() { int i; for (i = -16; i <= 16; i++) { if (i / q1 != div4[i+16]) return 1; if (i / q2 != divm4[i+16]) return 1; if (i % q1 != mod4[i+16]) return 1; if (i % q2 != modm4[i+16]) return 1; } return 0; }
false
false
false
false
false
0
execute() { unsigned int new_value; if (access) source = cpu_pic->register_bank[register_address]; else if (cpu16->extended_instruction() && register_address < 0x60) source = cpu_pic->registers[register_address + cpu16->ind2.fsr_value]; else source = cpu_pic->registers[register_address]; n...
false
false
false
false
false
0
LoadGP(int w, MovieRecord* mr) { if(w==0) { joy[0] = mr->joysticks[0]; if(FSAttached) joy[2] = mr->joysticks[2]; } else { joy[1] = mr->joysticks[1]; if(FSAttached) joy[3] = mr->joysticks[3]; } }
false
false
false
false
false
0
program_path_allocate(const char *argv0) { filestat_t buf; const char *file = argv0; char filepath[MAX_PATH_LEN + 1]; if (is_running_on_mingw() && !is_strsuffix(argv0, (size_t) -1, ".exe")) { concat_strings(filepath, sizeof filepath, argv0, ".exe", NULL); } else { clamp_strcpy(filepath, sizeof filepath, argv0...
false
false
false
false
false
0
stripsemicolon (TCHAR *s) { if (!s) return; while (_tcslen(s) > 0 && s[_tcslen(s) - 1] == ':') s[_tcslen(s) - 1] = 0; }
false
false
false
false
false
0
sym2_get_signalling(struct Scsi_Host *shost) { struct sym_hcb *np = sym_get_hcb(shost); enum spi_signal_type type; switch (np->scsi_mode) { case SMODE_SE: type = SPI_SIGNAL_SE; break; case SMODE_LVD: type = SPI_SIGNAL_LVD; break; case SMODE_HVD: type = SPI_SIGNAL_HVD; break; default: type = SPI_SI...
false
false
false
false
false
0
setGame(KReversiGame *game) { // disconnect signals from previous game if they exist, // we are not interested in them anymore if (m_game) { disconnect(m_game, SIGNAL(boardChanged()), this, SLOT(updateBoard())); disconnect(m_game, SIGNAL(moveFinished()), this, SLOT(gameMoveFinished())); ...
false
false
false
false
false
0
WriteKeyValue(IEEELittleEndianBinaryFileStream* bofs, uint16_t key, const std::vector<uint8_t>& val) { uint16_t num = static_cast<uint16_t>(std::ceil(static_cast<float>(val.size()) / 4.0f)); bofs->Write(key); bofs->Write(num); for (size_t i = 0 ; i < val.size() ; ++i) bofs->Write(val[i]); bofs->...
false
false
false
false
false
0
GetNextRawFeature() { if (nNextFID == nRows) return NULL; const void* xlshandle = poDS->GetXLSHandle(); if (xlshandle == NULL) return NULL; freexl_select_active_worksheet(xlshandle, iSheet); OGRFeature* poFeature = new OGRFeature(poFeatureDefn); FreeXL_CellValue sCellValue; ...
false
false
false
false
false
0
create_filelist(char *file, struct gfs_stat *st, void *arg) { struct flist *a = arg; int i, j, ncopy, src_ncopy = 0, dst_ncopy = 0; char **copy; gfarm_error_t e; e = gfs_replica_list_by_name(file, &ncopy, &copy); if (e != GFARM_ERR_NO_ERROR) return (e); for (i = 0; i < ncopy; ++i) { if ((a->src_hosthash == ...
false
false
false
false
false
0
InsertTetra(vtkIdType id, double r2, double center[3]) { if ( id >= this->Size ) { this->Resize(id+1); } this->Array[id].r2 = r2; this->Array[id].center[0] = center[0]; this->Array[id].center[1] = center[1]; this->Array[id].center[2] = center[2]; if ( id > this->MaxId ) { this->MaxId = i...
false
false
false
false
false
0
unparse_ac_parameter_list #ifdef KC_USE_PROTOTYPES (ac_parameter_list kc_p, void (*kc_printer)(char*, uview), uview kc_current_view) #else (kc_p, kc_printer, kc_current_view) ac_parameter_list kc_p; void (*kc_printer)KC__P((char*, uview)); uview kc_current_view; #endif { /*SUPPRESS 622*/ assert_ac_parameter_list(kc_p...
false
false
false
true
false
1
check_wd_first_through_third_range( git_repository *repo, const char *start, const char *end) { git_iterator *i; const git_index_entry *entry; int idx; static const char *expected[] = { "FIRST", "second", "THIRD", NULL }; cl_git_pass(git_iterator_for_workdir( &i, repo, GIT_ITERATOR_IGNORE_CASE, start, end)); ...
false
false
false
false
false
0
colorval_name (gint colorval) { gint i; for (i = 0; i < NUM_COLORS; i++) if (colorval == color_lookup[i].colorval) return color_lookup[i].name; return "unknown"; }
false
false
false
false
false
0
rb_f_require_relative(VALUE obj, VALUE fname) { VALUE base = rb_current_realfilepath(); if (NIL_P(base)) { rb_raise(rb_eLoadError, "cannot infer basepath"); } base = rb_file_dirname(base); return rb_require_safe(rb_file_absolute_path(fname, base), rb_safe_level()); }
false
false
false
false
false
0
is_invalid(DB_HOST_APP_VERSION& hav) { hav.consecutive_valid = 0; if (hav.max_jobs_per_day > config.daily_result_quota) { hav.max_jobs_per_day--; } }
false
false
false
false
false
0
pxa168_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct pxa168_eth_private *pep = netdev_priv(dev); int err; err = phy_read_status(pep->phy); if (err == 0) err = phy_ethtool_gset(pep->phy, cmd); return err; }
false
false
false
false
false
0
ai_path_type_match(char *p) { int i; for(i = 0; i < Num_ai_path_types; i++) { if(!stricmp(AI_path_types[i], p)) return i; } return -1; }
false
false
false
false
true
1
help_env(void) { char *cp; string_list_ty manpath; string_ty *s; string_list_ty lib; size_t j, k; // // Honour any existing MANPATH setting by appending only. // Read the MANPATH to set the initial path. // cp = getenv("MANPATH"); if (cp) { s...
false
false
false
false
false
0
writeEnableDebugger(char *str) { if (strlen(str) == 0) { /* no password, probably impossible? */ writeTagHeader(TAG_ENABLEDEBUGGER, 0); } else { /* password found */ writeTagHeader(TAG_ENABLEDEBUGGER, strlen(str) + 3); flputShort(0); flputString(str); } }
false
false
false
false
false
0
db_str2int(const char* _s, int* _v) { long tmp; if (!_s || !_v) { LM_ERR("Invalid parameter value\n"); return -1; } tmp = strtoul(_s, 0, 10); if ((tmp == ULONG_MAX && errno == ERANGE) || (tmp < INT_MIN) || (tmp > UINT_MAX)) { LM_ERR("Value out of range\n"); return -1; } *_v = (int)tm...
false
false
false
false
false
0
SetNewName( OGRSpatialReference* pOgr, const char* keyName, const char* newName ) { OGR_SRSNode *poNode = pOgr->GetAttrNode( keyName ); OGR_SRSNode *poNodeChild = NULL; if(poNode) poNodeChild = poNode->GetChild(0); if( poNodeChild) poNodeChild->SetValue( newName); }
false
false
false
false
false
0
evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->layer_set.func = NULL; ...
false
false
false
false
false
0
integer_overflow () { if (!skip_evaluation && pedantic) pedwarn ("integer overflow in preprocessor expression"); }
false
false
false
false
false
0
pack_iy(int n) { tagint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; else buf[n] = 0.0; n += nvalues; } }
false
false
false
false
false
0
L5() {register object *base=vs_base; register object *sup=base+VM5; VC5 vs_check; vs_top=sup; goto TTL; TTL:; V5= ((object)VV[22]); base[0]= (*(LnkLI17))(((object)VV[9]),V5,((object)VV[4]),((object)VV[11])); vs_top=(vs_base=base+0)+1; return; }
false
false
false
false
false
0
pputs_utf8(char *s, int a) { UCS *ucsstr = NULL; if(s && *s){ ucsstr = utf8_to_ucs4_cpystr(s); if(ucsstr){ pputs(ucsstr, a); fs_give((void **) &ucsstr); } } }
false
false
false
false
false
0
__vxge_hw_vpath_xmac_rx_stats_get(struct __vxge_hw_virtualpath *vpath, struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats) { u64 *val64; enum vxge_hw_status status = VXGE_HW_OK; int i; u32 offset = VXGE_HW_STATS_VPATH_RX_OFFSET; val64 = (u64 *) vpath_rx_stats; if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { st...
false
false
false
false
false
0
_g_time_val_to_xmp_date (GTimeVal *time_) { time_t secs; struct tm *tm; int offset; char *retval; g_return_val_if_fail (time_->tv_usec >= 0 && time_->tv_usec < G_USEC_PER_SEC, NULL); secs = time_->tv_sec; tm = localtime (&secs); offset = _g_time_get_timezone_offset (tm); retval = g_strdup_pri...
false
false
false
false
false
0
beiscsi_module_init(void) { int ret; beiscsi_scsi_transport = iscsi_register_transport(&beiscsi_iscsi_transport); if (!beiscsi_scsi_transport) { printk(KERN_ERR "beiscsi_module_init - Unable to register beiscsi transport.\n"); return -ENOMEM; } printk(KERN_INFO "In beiscsi_module_init, tt=%p\n", ...
false
false
false
false
false
0
check_transfer_rate(struct request *rq, int size) { struct group *group ; int cbytes, bw; /* LOCK_CONFIG must be done, but this slow things down */ group = rq_to_group(rq); if ( group ) { bw = group->bandwidth; cbytes = MID(bytes); if ( cbytes < bw ) return; /* must sleep a little. */ my_sleep(1...
false
false
false
false
false
0
find_lunch(int str, int *lunch) { int pos; int k; ASSERT1(IS_STONE(board[str]), str); ASSERT1(stackp == 0, str); *lunch = NO_MOVE; for (pos = BOARDMIN; pos < BOARDMAX; pos++) { if (board[pos] != OTHER_COLOR(board[str])) continue; for (k = 0; k < 8; k++) { int apos = pos + delta[k]; ...
false
false
false
false
false
0
cmp (char const *a, size_t a_len, char const *b, size_t b_len) { if (a_len < b_len) return -1; if (b_len < a_len) return 1; return (strcmp (a, b)); }
false
false
false
false
false
0
tracktab_next(tset) char *tset; { struct tracktab *tp; for(tp = &tracktabs[0]; tp->name; tp++) if (!STRCMP(tp->name, tset)) { tp++; break; } if (!tp->name) tp = &tracktabs[0]; tracktab = tp; return tp->name; }
false
false
false
false
false
0
hx509_peer_info_set_cms_algs(hx509_context context, hx509_peer_info peer, const AlgorithmIdentifier *val, size_t len) { size_t i; free_cms_alg(peer); peer->val = calloc(len, sizeof(*peer->val)); if (peer->val == NULL) { peer->len = 0; hx509_set_error_string(context, 0, ENOMEM...
false
false
false
false
false
0
i40e_free_asq_bufs(struct i40e_hw *hw) { int i; /* only unmap if the address is non-NULL */ for (i = 0; i < hw->aq.num_asq_entries; i++) if (hw->aq.asq.r.asq_bi[i].pa) i40e_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); /* free the buffer info list */ i40e_free_virt_mem(hw, &hw->aq.asq.cmd_buf); /* free the d...
false
false
false
false
false
0
ges_track_remove_element (GESTrack * track, GESTrackElement * object) { GSequenceIter *it; GESTrackPrivate *priv; g_return_val_if_fail (GES_IS_TRACK (track), FALSE); g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE); priv = track->priv; GST_DEBUG_OBJECT (track, "Removing %" GST_PTR_FORMAT, obje...
false
false
false
false
false
0
has_limbo_value(std::string name) const { CYG_REPORT_FUNCNAMETYPE("CdlToplevel::has_limbo_value", "result %d"); CYG_REPORT_FUNCARG1XV(this); CYG_PRECONDITION_THISC(); CYG_PRECONDITIONC("" != name); bool result = false; if (limbo.find(name) != limbo.end()) { result = true; } CYG...
false
false
false
false
false
0
FileSkipWhiteX(FILE *fp) { for (;;) { int c; bool bEof; /* GetChar */ if ((c = fgetc(fp))==EOF) { bEof = TRUE; } else { bEof = FALSE; } if (bEof) return TRUE; if (!isspace(c)) { if (ungetc(c, fp...
false
false
false
false
true
1
patch(const char *str) { char *p = strchr(egg_version, '+'); if (!p) p = &egg_version[strlen(egg_version)]; sprintf(p, "+%s", str); egg_numver++; sprintf(&egg_xtra[strlen(egg_xtra)], " %s", str); }
false
false
false
false
false
0
remove_dead_dialplan_useage(struct parking_dp_map *old_map, struct parking_dp_map *new_map) { struct parking_dp_context *old_ctx; struct parking_dp_context *new_ctx; struct ast_context *con; int cmp; old_ctx = AST_LIST_FIRST(old_map); new_ctx = AST_LIST_FIRST(new_map); while (new_ctx) { if (!old_ctx) { /*...
false
false
false
false
false
0
rfio_getcwd(char *buf, int size) { char *p; INIT_TRACE("RFIO_TRACE"); TRACE(1, "rfio", "rfio_getcwd()"); if ( rfio_HsmIf_GetCwdType() > 0 ) { /* * HSM file */ TRACE(1, "rfio", "rfio_getcwd: current working directory is an HSM path"); END_TRACE(); ...
false
false
false
false
false
0
unpackHtds() { FILE *file, *out; char *filename, outfilename[16]; int fileNo; unsigned long size; hNode *rootNode; int i, id; unsigned char dataByte, dataMask; unsigned char data[20864]; unsigned char magic[4]; id = 0; for (fileNo = 0; fileNo < 2; fileNo++) { ...
false
false
false
false
true
1
set_sge_param(struct net_device *dev, struct ethtool_ringparam *e) { struct port_info *pi = netdev_priv(dev); struct adapter *adapter = pi->adapter; struct qset_params *q; int i; if (e->rx_pending > MAX_RX_BUFFERS || e->rx_jumbo_pending > MAX_RX_JUMBO_BUFFERS || e->tx_pending > MAX_TXQ_ENTRIES || e...
false
false
false
false
false
0
clear_cards (mword start, mword size) { guint8 *addr = sgen_card_table_get_card_address (start); size_t bytes = sgen_card_table_number_of_cards_in_range (start, size); if (bytes >= CARD_COUNT_IN_BYTES) { memset (sgen_cardtable, 0, CARD_COUNT_IN_BYTES); } else if (addr + bytes > SGEN_CARDTABLE_END) { size_t fir...
false
false
false
false
false
0
store_remove_link(struct most_aim_obj *aim_obj, struct most_aim_attribute *attr, const char *buf, size_t len) { struct most_c_obj *c; char buffer[STRING_SIZE]; char *mdev; char *mdev_ch; int ret; size_t max_len = min_t(size_t, len + 1, STRING_SIZE); strlcpy(buffer, buf, max_len); strlcpy(aim_obj...
true
true
false
false
false
1
putpix(IMAGE *image, unsigned int pix) { if(--(image)->cnt>=0) return (unsigned int)(*(image)->ptr++ = pix); else return iflsbuf(image,pix); }
false
false
false
false
false
0
SDepth(size_t vl, size_t vr) const{ size_t h,k, val; if(vl!=vr){ k = npr->find_RMQ(vl+1, vr, csa, lcp); h = lcp->get_LCP(k, csa); } else{/*for leaf (->v.left==v.right)*/ val = csa->getSA(vl); h = length - val +1; } return h; }
false
false
false
false
false
0
build_denotify(int t, struct dtags *d) { commandlist_t *ret = new_command(t); assert(t == DENOTIFY); if (ret) { ret->u.d.comptag = d->comptag; ret->u.d.relation=d->relation; ret->u.d.pattern = d->pattern; d->pattern = NULL; ret->u.d.priority = d->priority; free_dtags(d); } return ret; }
false
false
false
false
false
0
extract_root_name(const char *path, char *root_name) { int i; for (i = 1; path[i] && path[i] != '/'; i++) root_name[i - 1] = path[i]; root_name[i - 1] = '\0'; return strlen(&path[i]); }
false
false
false
false
false
0
__duplicate_list ( char ** list ) { char ** result = NULL; if ( list ) { size_t size = 1; char ** tmp = list; while ( *tmp++ ) ++size; result = malloc ( size * sizeof ( char * ) ); for ( tmp = result; *list; tmp++ ) *tmp = strdup ( *list++ ); } return result; }
false
false
false
false
false
0
cavan_daemon_stop(struct cavan_daemon_description *desc) { pid_t pid; if (desc == NULL) { pr_red_info("desc == NULL"); return -EINVAL; } if (desc->pidfile) { char buff[1024]; ssize_t readlen; readlen = file_read(desc->pidfile, buff, sizeof(buff)); if (readlen < 0) { pr_red_info("Read file %s f...
true
true
false
false
false
1
message_integrity_calc(const quint8 *buf, int size, const QByteArray &key) { QCA::MessageAuthenticationCode hmac("hmac(sha1)", key); QByteArray region = QByteArray::fromRawData((const char *)buf, size); QByteArray result = hmac.process(region).toByteArray(); Q_ASSERT(result.size() == 20); return result; }
false
false
false
false
false
0
_e_fm_ipc_handle_error_response(int id, E_Fm_Op_Type type) { E_Fm_Task *task = _e_fm_ipc_task_get(id); E_Fm_Slave *slave = NULL; if (!task) { slave = _e_fm_ipc_slave_get(id); if (slave) _e_fm_ipc_slave_send(slave, type, NULL, 0); return; } if (type == E_FM_OP_ERROR_RESPON...
false
false
false
false
false
0
Niall_Reply(char *Buffer,int BufSize) { WORD *Word; /* Clear the buffer. */ Buffer[0]=0; /* Check we have some words to say */ if(WordList==NULL) { Niall_Warning("Corrupted brain (Not initialised)."); Niall_NewDictionary(); return; } if(CountProbs(WordList)==0) { strcpy(Buffer,"I cannot speak yet!"...
false
false
false
false
false
0
cp790_error_detect(uint8_t *rdbuf) { /* CP790 */ if (rdbuf[5] == 0xff) { ERROR("No ribbon loaded!\n"); return 1; } else if (rdbuf[4] == 0xff) { ERROR("No paper tray loaded!\n"); return 1; } else if (rdbuf[3]) { if ((rdbuf[3] & 0xf) == 0x02) // 0x12 0x22 ERROR("No paper tray loaded!\n"); else if ((rd...
false
false
false
false
false
0
cpuintrf_init_cpu(int cpunum, int cputype) { char familyname[256]; int j, size; /* fill in the type and interface */ cpu[cpunum].intf = cpuintrf[cputype]; cpu[cpunum].cputype = cputype; /* determine the family index */ strcpy(familyname, cputype_core_file(cputype)); for (j = 0; j < CPU_COUNT; j++) ...
false
false
false
false
false
0
lookup(char *line, char *pattern, char **value) { char *p, *v; int len = strlen(pattern); if (!*line) return 0; /* pattern */ if (strncmp(line, pattern, len)) return 0; /* white spaces */ for (p = line + len; isspace(*p); p++); /* separator */ if (*p != ':') return 0; /* white spaces */ for (++p; ...
false
false
false
false
false
0
lpfc_bsg_handle_sli_cfg_mbox(struct lpfc_hba *phba, struct fc_bsg_job *job, struct lpfc_dmabuf *dmabuf) { struct lpfc_sli_config_mbox *sli_cfg_mbx; uint32_t subsys; uint32_t opcode; int rc = SLI_CONFIG_NOT_HANDLED; /* state change on new multi-buffer pass-through mailbox command */ phba->mbox_ext_buf_ctx...
false
false
false
false
false
0
gst_plugin_finalize (GObject * object) { GstPlugin *plugin = GST_PLUGIN_CAST (object); GST_DEBUG ("finalizing plugin %" GST_PTR_FORMAT, plugin); /* FIXME: make registry add a weak ref instead */ #if 0 GstRegistry *registry = gst_registry_get (); GList *g; for (g = registry->plugins; g; g = g->next) { ...
false
false
false
false
false
0
init_logging (int count,...){ _fFatal = stderr; _fError = stderr; _fWarn = stderr; _fInfo = stderr; _fDebug = stderr; va_list ap; int i/*,sum*/; va_start (ap, count); /* Initialize the argument list. */ for (i = 0; i < count; i++){ switch(i){ case 0: _fFatal = va_arg (ap, ...
false
false
false
false
false
0
gnm_style_required_spanflags (GnmStyle const *style) { GnmSpanCalcFlags res = GNM_SPANCALC_SIMPLE; if (gnm_style_is_element_set (style, MSTYLE_CONDITIONS)) /* Note that style->cond_styles may not be set yet */ /* More importantly, even if the conditions are empty we */ /* have to rerender everything since we d...
false
false
false
false
false
0
ps30_output(struct svga_shader_emitter *emit, struct tgsi_declaration_semantic semantic, unsigned idx) { switch (semantic.Name) { case TGSI_SEMANTIC_COLOR: if (emit->unit == PIPE_SHADER_FRAGMENT) { if (emit->key.fkey.white_fragments) { /* Used for XOR logicop mod...
false
false
false
false
false
0
do_menu (ScreenInfo * s) { if ((bar_hidden >= 0) && (numhidden > 0) && (bar_hidden < numhidden)) { bar_hidden = numhidden; update_tbar (); } else switch (-bar_hidden + MENU_BASE) { case 0: toggle_clickthru (s); break; case 1: toggle_tile_resize (s); break; case 2:...
false
false
false
false
false
0
ethtool_get_default_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct mlx4_en_priv *priv = netdev_priv(dev); int trans_type; cmd->autoneg = AUTONEG_DISABLE; cmd->supported = SUPPORTED_10000baseT_Full; cmd->advertising = ADVERTISED_10000baseT_Full; trans_type = priv->port_state.transceiver;...
false
false
false
false
false
0
xdr_dis_time(xdrs, objp) XDR *xdrs; dis_time *objp; { if (!xdr_byte_u_long(xdrs, &objp->hour)) { return (FALSE); } if (!xdr_dis_timestamp(xdrs, &objp->rel)) { return (FALSE); } return (TRUE); }
false
false
false
false
false
0
color_from_player(int player) { unsigned long rv = 0; if(player == WHITE) rv = white_piece; else if(player == BLACK) rv = black_piece; else fprintf(stderr, "unknown player %d\n", player); return(rv); }
false
false
false
false
false
0
gst_file_index_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstFileIndex *index = GST_FILE_INDEX (object); switch (prop_id) { case ARG_LOCATION: if (index->location) g_free (index->location); index->location = g_value_dup_string (value); ...
false
false
false
false
false
0
init_once(void) { unsigned int i; if (uv_cond_init(&cond)) abort(); if (uv_mutex_init(&mutex)) abort(); ngx_queue_init(&wq); for (i = 0; i < ARRAY_SIZE(threads); i++) if (uv_thread_create(threads + i, worker, NULL)) abort(); initialized = 1; }
false
false
false
false
false
0
attachment_button_dispose (GObject *object) { EAttachmentButtonPrivate *priv; priv = E_ATTACHMENT_BUTTON_GET_PRIVATE (object); if (priv->view != NULL) { g_object_unref (priv->view); priv->view = NULL; } if (priv->attachment != NULL) { g_signal_handler_disconnect ( priv->attachment, priv->reference_h...
false
false
false
false
false
0
SMBencrypt(unsigned char *passwd, const unsigned char *c8, unsigned char *p24) { int rc; unsigned char p14[14], p16[16], p21[21]; memset(p14, '\0', 14); memset(p16, '\0', 16); memset(p21, '\0', 21); memcpy(p14, passwd, 14); rc = E_P16(p14, p16); if (rc) return rc; memcpy(p21, p16, 16); rc = E_P24(p21, c8...
false
false
false
false
false
0
SlowGetPointerFromInternalField(int index) { i::Handle<i::JSObject> obj = Utils::OpenHandle(this); i::Object* value = obj->GetInternalField(index); if (value->IsSmi()) { return i::Internals::GetExternalPointerFromSmi(value); } else if (value->IsForeign()) { return reinterpret_cast<void*>(i::Foreign::cas...
false
false
false
false
false
0
quiesce_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc) { quiesce_priv_t *priv = NULL; call_stub_t *stub = NULL; priv = this->private; if (priv->pass_through) { STACK_WIND (frame, default_unlink_cbk, FIRST...
false
false
false
false
false
0
create_regexp(const char *regstr, int options) { regex_t *exp; int errcode; int msgsize; char *errmsg; if((exp = (regex_t *) malloc(sizeof(regex_t)))) { if((errcode = regcomp(exp, regstr, (options & JG_IGNORE_CASE) ? REG_ICASE : 0))) { fprintf(stderr, "regcomp of regex failed,\n"); if((errmsg = (char *) ...
false
false
false
false
false
0
static_initialize() { // function called to initialize static globals if (!null_memo) { #if CLICK_DMALLOC CLICK_DMALLOC_REG("str0"); #endif null_memo = new Memo; null_memo->_refcount++; permanent_memo = new Memo; permanent_memo->_refcount++; // use a separate string for oom_memo's data, so we can distingu...
false
false
false
false
false
0
OnPaint(wxPaintEvent &event) { wxPaintDC dc(this); dc.SetMapMode(wxMM_TEXT); // paint the background image dc.DrawBitmap(*m_background, 0, 0); // paint the header: Barry logo m_barry_logo->Draw(dc); // paint the header: NetDirect logo // m_netdirect_logo->Draw(dc); // paint the header: text auto_ptr<wxFont...
false
false
false
false
false
0
transfer(unsigned long long int n) { if (disabled) { last_time = time(NULL); return true; } time_t t = time(NULL); time_t dt = t - last_time; Nall += n; if (dt > T) N = (n * dt) / T; else N = (N * (T - dt)) / T + n; if ((t - first_time) >= T * 3) { /* make d...
false
false
false
false
false
0
load_metadata_backend (void) { static gsize backend_chosen = 0; if (g_once_init_enter (&backend_chosen)) { gchar **environment = g_get_environ (); const gchar *backend = g_environ_getenv (environment, ...
false
false
false
false
false
0
ves_icall_MonoMethod_get_base_method (MonoReflectionMethod *m, gboolean definition) { MonoClass *klass, *parent; MonoMethod *method = m->method; MonoMethod *result = NULL; int slot; MONO_ARCH_SAVE_REGS; if (method->klass == NULL) return m; if (!(method->flags & METHOD_ATTRIBUTE_VIRTUAL) || MONO_CLASS_I...
false
false
false
false
false
0
Clean(CommandLine &CmdL) { if (CmdL.FileSize() != 2) return ShowHelp(CmdL); // Read the configuration file. Configuration Setup; if (ReadConfigFile(Setup,CmdL.FileList[1],true) == false) return false; vector<PackageMap> PkgList; LoadTree(PkgList,Setup); LoadBinDir(PkgList,Setup); ...
false
false
false
false
false
0
blockSeqCodeCopy(MethodBlock *mb, TestCodeBlock *block, BasicBlock *start, int ins_start, BasicBlock *end, int ins_end) { char *code_pntr = (char *)(block + 1); BasicBlock *patchers, *ext_patchers = NULL; Instruction *ins_start_pntr = &start->start[ins_start]; char *map[end->star...
false
false
false
false
false
0
soc_pcm_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_platform *platform = rtd->platform; if (platform->driver->ops && platform->driver->ops->ioctl) return platform->driver->ops->ioctl(substream, cmd, arg)...
false
false
false
false
false
0
free_script_list (script_t * script) { script_t *next; while (script) { next = script->next; if (script->name) free (script->name); if (script->buf) free (script->buf); free (script); script = next; } }
false
false
false
false
false
0
sig_left() { if (!first) return (0); unsigned n=alarm(0); return (n ? n <= first->set_interval ? first->set_interval - n:0:0); }
false
false
false
false
false
0
setPolyFlags(dtPolyRef ref, unsigned short flags) { unsigned int salt, it, ip; decodePolyId(ref, salt, it, ip); if (it >= (unsigned int)m_maxTiles) return DT_FAILURE; if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return DT_FAILURE; dtMeshTile* tile = &m_tiles[it]; if (ip >= (unsigned int)tile->header->...
false
false
false
false
false
0
eappeap_failure(EAP_HANDLER *handler, tls_session_t *tls_session) { uint8_t tlv_packet[11]; REQUEST *request = handler->request; RDEBUG2("FAILURE"); tlv_packet[0] = PW_EAP_REQUEST; tlv_packet[1] = handler->eap_ds->response->id +1; tlv_packet[2] = 0; tlv_packet[3] = 11; /* length of this packet */ tlv_packet[4...
false
false
false
false
false
0
collection_save_private(CollectionData *cd, const gchar *path) { SecureSaveInfo *ssi; GList *work; gchar *pathl; if (!path && !cd->path) return FALSE; if (!path) { path = cd->path; } pathl = path_from_utf8(path); ssi = secure_open(pathl); g_free(pathl); if (!ssi) { log_printf(_("failed to open co...
false
false
false
false
false
0
rtp_source_timeout (RTPSource * src, GstClockTime current_time, GstClockTime collision_timeout, GstClockTime feedback_retention_window) { GList *item; GstRTCPPacket *pkt; item = g_list_first (src->conflicting_addresses); while (item) { RTPConflictingAddress *known_conflict = item->data; GList *next...
false
false
false
false
false
0
vacuum_one_database(const char *dbname, bool full, bool verbose, bool analyze, const char *table, const char *host, const char *port, const char *username, bool password, const char *progname, bool echo, bool quiet) { PQExpBufferData sql; PGconn *conn; PGresult *result; initPQExpBuffer(&s...
false
false
false
false
false
0
test_model(Affine_Model_Type type, C4_Score expected_score){ register C4_Model *affine = Affine_create(type, Alphabet_Type_PROTEIN, Alphabet_Type_PROTEIN, FALSE); /**/ regist...
false
false
false
false
false
0
CommaSeparateAndAddOccurrence(Option *Handler, unsigned pos, StringRef ArgName, StringRef Value, bool MultiArg = false) { // Check to see if this option accepts a comma separated list of values. If // it does, we have to split up t...
false
false
false
false
false
0
AssembleOutputPoints( vtkIdType timeStep, BlockSetInfoType* bsinfop, vtkUnstructuredGrid* output ) { (void)timeStep; vtkPoints* pts = output->GetPoints(); if ( ! pts ) { pts = vtkPoints::New(); output->SetPoints( pts ); pts->FastDelete(); } else { pts->Reset(); } int ts = -1...
false
false
false
false
false
0
PeerListInquire(const Request &request) { QHash<QByteArray, QUrl> id_to_addr; const Id &my_id = GetConnectionManager()->GetId(); const ConnectionTable &ct = GetConnectionManager()->GetConnectionTable(); foreach(const QSharedPointer<Connection> &con, ct.GetConnections()) { if(con->GetRemoteId() ...
false
false
false
false
false
0
readnumf(num) char *num; /* read integer from string without advancing character pointer */ { int t; char* p; p =num; if (!isdigit(*p)) { event_error("Missing Number"); }; t = 0; while (((int)*p >= '0') && ((int)*p <= '9')) { t = t * 10 + (int) *p - '0'; p = p + 1; }; return (t); }
false
false
false
false
false
0