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
ShowRescaledItem(int position, int TuxItemRow, item * ShowItem) { SDL_Rect TargetRectangle = { 0, 0, INITIAL_BLOCK_WIDTH * GameConfig.screen_width / 640, INITIAL_BLOCK_HEIGHT * GameConfig.screen_height / 480 }; static struct image equipped_icon; if (!image_loaded(&equipped_icon)) { load_image(&equipped_icon,...
false
false
false
false
false
0
ssb_pcicore_init(struct ssb_pcicore *pc) { struct ssb_device *dev = pc->dev; if (!dev) return; if (!ssb_device_is_enabled(dev)) ssb_device_enable(dev, 0); #ifdef CONFIG_SSB_PCICORE_HOSTMODE pc->hostmode = pcicore_is_in_hostmode(pc); if (pc->hostmode) ssb_pcicore_init_hostmode(pc); #endif /* CONFIG_SSB_PCIC...
false
false
false
false
false
0
glob_(const char *pattern, int flags, int (*errfunc) (const char *, int), glob_t * pglob, unsigned long maxfiles, int maxdepth) { const unsigned char *patnext; int c; Char *bufnext, *bufend, patbuf[MAXPATHLEN + 1]; pglob->gl_maxdepth = maxdepth; pg...
false
false
false
false
false
0
sx_recurrence_handler(xmlNodePtr node, gpointer _pdata) { struct sx_pdata *parsing_data = _pdata; GList *schedule = NULL; gchar* debug_str; g_return_val_if_fail(node, FALSE); if (!dom_tree_generic_parse(node, sx_recurrence_list_handlers, &schedule)) return FALSE; // g_return_val_if_fai...
false
false
false
false
false
0
inlineCost(InlineCostState *ics) { // Can't handle return statements nested in if's if (ics->nested) return COST_MAX; return expressionInlineCost(exp, ics); }
false
false
false
false
false
0
node_ua_cmp(const void *np1, const void *np2) { const gnutella_node_t *n1 = *(const gnutella_node_t **) np1; const gnutella_node_t *n2 = *(const gnutella_node_t **) np2; /* * Put gtk-gnutella nodes at the beginning of the array. */ if (node_is_gtkg(n1)) return node_is_gtkg(n2) ? strcmp(n1->vendor, n2->vendo...
false
false
false
false
false
0
assign_block_caption(GtDiagram *d, GtFeatureNode *node, GtFeatureNode *parent, GtBlock *block, GtError *err) { const char *nnid_p = NULL, *nnid_n = NULL; GtStr *caption = NULL; bool stat...
false
false
false
false
false
0
gf_inline_is_protolib_object(GF_Scene *scene, GF_ObjectManager *odm) { u32 i; GF_ProtoLink *pl; i=0; while ((pl = (GF_ProtoLink*)gf_list_enum(scene->extern_protos, &i))) { if (pl->mo->odm == odm) return 1; } return 0; }
false
false
false
false
false
0
on_loadimage_clicked #endif (GtkButton *button, gpointer user_data) { int i = GPOINTER_TO_UINT(gtk_widget_get_data_top(GTK_WIDGET(button),"imagenum")); #ifdef IS_PLYMORPH fileselection_hook=load_ply_from_file; #else fileselection_hook=load_image_from_file; #endif fileselection1_...
false
false
false
false
false
0
gda_web_provider_get_data_handler (GdaServerProvider *provider, GdaConnection *cnc, G_GNUC_UNUSED GType type, G_GNUC_UNUSED const gchar *dbms_type) { WebConnectionData *cdata = NULL; if (cnc) { g_return_val_if_fail (GDA_IS_CONNECTION (cnc), FALSE); g_return_val_if_fail (gda_connection_get_provider (cnc) =...
false
false
false
false
false
0
fm_path_list_new_from_file_info_gslist(GSList* fis) { FmPathList* list = fm_path_list_new(); GSList* l; for(l=fis;l;l=l->next) { FmFileInfo* fi = (FmFileInfo*)l->data; fm_path_list_push_tail(list, fm_file_info_get_path(fi)); } return list; }
false
false
false
false
false
0
qla1280_wait_for_pending_commands(struct scsi_qla_host *ha, int bus, int target) { int cnt; int status; struct srb *sp; struct scsi_cmnd *cmd; status = SUCCESS; /* * Wait for all commands with the designated bus/target * to be completed by the firmware */ for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; c...
false
false
false
false
false
0
exynos5440_tmu_initialize(struct platform_device *pdev) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); unsigned int trim_info = 0, con, rising_threshold; int threshold_code; int crit_temp = 0; /* * For exynos5440 soc triminfo value is swapped between TMU0 and * TMU2, so the below logic is needed...
false
false
false
false
false
0
gsasl_base64_to (const char *in, size_t inlen, char **out, size_t * outlen) { size_t len = base64_encode_alloc (in, inlen, out); if (outlen) *outlen = len; if (*out == NULL) return GSASL_MALLOC_ERROR; return GSASL_OK; }
false
false
false
false
false
0
cal_object_get_rdate_end (CalObjTime *occ, GArray *rdate_periods, icaltimezone *zone) { CalObjRecurrenceDate *rdate = NULL; ECalComponentPeriod *p; gint lower, upper, middle, cmp = 0; lower = 0; upper = rdate_periods->len; while (lower < upper) { middle = (l...
false
false
false
false
false
0
chk1_arrinit_expr(struct expr_t *xp, char *paramnam, int32 ai) { if (__expr_has_glb(xp) || !__src_rd_chk_paramexpr(xp, 0)) { __pv_ferr(1025, "parameter array initializer cell %s[%d] \"%s\" illegal - parameters and constants only", paramnam, ai, __msgexpr_tostr(__xs, xp)); /* need to still add value of ...
false
false
false
false
false
0
size_htab_eq (const void *x, const void *y) { tree xt = (tree) x; tree yt = (tree) y; return (TREE_INT_CST_HIGH (xt) == TREE_INT_CST_HIGH (yt) && TREE_INT_CST_LOW (xt) == TREE_INT_CST_LOW (yt) && TREE_TYPE (xt) == TREE_TYPE (yt) && TREE_OVERFLOW (xt) == TREE_OVERFLOW (yt)); }
false
false
false
false
false
0
findFunctionSummaryInMemBuffer( MemoryBufferRef Object, LLVMContext &Context, StringRef FunctionName) { sys::fs::file_magic Type = sys::fs::identify_magic(Object.getBuffer()); switch (Type) { case sys::fs::file_magic::bitcode: { return readFunctionSummary(Object, Context, nullptr, FunctionName, ...
false
false
false
false
false
0
pixbuf_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { ECellPixbufView *pixbuf_view = g_new0 (ECellPixbufView, 1); ETableItem *eti = E_TABLE_ITEM (e_table_item_view); GnomeCanvas *canvas = GNOME_CANVAS_ITEM (eti)->canvas; pixbuf_view->ce...
false
false
false
false
false
0
gst_base_text_overlay_getcaps (GstPad * pad, GstBaseTextOverlay * overlay, GstCaps * filter) { GstPad *otherpad; GstCaps *caps; if (G_UNLIKELY (!overlay)) return gst_pad_get_pad_template_caps (pad); if (pad == overlay->srcpad) otherpad = overlay->video_sinkpad; else otherpad = overlay->srcpa...
false
false
false
false
false
0
L26() {register object *base=vs_base; register object *sup=base+VM26; VC26 vs_check; {object V82; register object V83; V82=(base[0]); V83=(base[1]); vs_top=sup; goto TTL; TTL:; if(!(eql((V82),small_fixnum(0)))){ goto T110;} {object V84; V84= ((V83))->v.v_self[(long)12]; base[2]= CMPcar((V84)); base[3]= CM...
false
false
false
false
false
0
flow_loop_dump (loop, file, loop_dump_aux, verbose) const struct loop *loop; FILE *file; void (*loop_dump_aux) PARAMS((const struct loop *, FILE *, int)); int verbose; { basic_block *bbs; int i; if (! loop || ! loop->header) return; fprintf (file, ";;\n;; Loop %d:%s\n", loop->num, ...
false
false
false
false
false
0
CreateNamedColorDevicelink(cmsHTRANSFORM xform) { _cmsTRANSFORM* v = (_cmsTRANSFORM*) xform; cmsHPROFILE hICC = NULL; int i, nColors; cmsNAMEDCOLORLIST *nc2 = NULL, *Original = NULL; // Create an empty placeholder hICC = cmsCreateProfilePlaceholder(v->ContextID); if (hICC == NULL) return ...
false
false
false
false
false
0
vcal_folder_export(Folder *folder) { FolderItem *item = folder?folder->inbox:NULL; gboolean need_scan = folder?vcal_scan_required(folder, item):TRUE; if (vcal_folder_lock_count) /* blocked */ return; vcal_folder_lock_count++; if (vcal_meeting_export_calendar(vcalprefs.export_path, vcalprefs.export_user, ...
false
false
false
false
false
0
mpd_async_send_command_v(struct mpd_async *async, const char *command, va_list args) { size_t room, length; char *dest, *end, *p; const char *arg; assert(async != NULL); assert(command != NULL); if (mpd_error_is_defined(&async->error)) return false; room = mpd_buffer_room(&async->output); length = strl...
false
false
false
false
false
0
JustDied(Unit* pKiller) override { if (pKiller->GetTypeId() == TYPEID_UNIT && pKiller->GetEntry() == NPC_RAGNAROS) { DoScriptText(SAY_ARRIVAL4_MAJ, m_creature); } }
false
false
false
false
false
0
__txn_gid(env, mbp, txn) ENV *env; DB_MSGBUF *mbp; DB_TXN_ACTIVE *txn; { u_int32_t v, *xp; u_int i; int cnt; __db_msgadd(env, mbp, "\n\tGID:"); for (cnt = 0, xp = (u_int32_t *)txn->gid, i = 0;;) { memcpy(&v, xp++, sizeof(u_int32_t)); __db_msgadd(env, mbp, "%#lx ", (u_long)v); if ((i += sizeof(u_int32_t))...
false
false
false
false
false
0
mxl111sf_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num) { struct dvb_usb_device *d = i2c_get_adapdata(adap); struct mxl111sf_state *state = d->priv; int hwi2c = (state->chip_rev > MXL111SF_V6); int i, ret; if (mutex_lock_interruptible(&d->i2c_mutex) < 0) return -EAGAIN; for (i = 0; ...
false
false
false
false
false
0
OnSessionState(BaseSession* session, BaseSession::State state) { switch (state) { case Session::STATE_RECEIVEDACCEPT: case Session::STATE_RECEIVEDREJECT: case Session::STATE_RECEIVEDTERMINATE: session_client_->session_manager()->signaling_thread()->Clear(this, MSG_TERMINATECALL); bre...
false
false
false
false
false
0
xenvif_tx_err(struct xenvif_queue *queue, struct xen_netif_tx_request *txp, RING_IDX end) { RING_IDX cons = queue->tx.req_cons; unsigned long flags; do { spin_lock_irqsave(&queue->response_lock, flags); make_tx_response(queue, txp, XEN_NETIF_RSP_ERROR); push_tx_responses(queue); spin_unlock_irqrestore(...
false
false
false
false
false
0
ad5624r_read_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int *val, int *val2, long m) { struct ad5624r_state *st = iio_priv(indio_dev); switch (m) { case IIO_CHAN_INFO_SCALE: *val = st->vref_mv; *val2 = chan->scan_type.realbits; return IIO_VAL_FRACTIONAL_LOG2; } ...
false
false
false
false
false
0
read_file_2(File* filePtr) { if( !read_book_mark( BOOK_MARK+101 ) ) return 0; if( !game.read_file(filePtr) ) return 0; if( !read_book_mark( BOOK_MARK+102 ) ) return 0; if( !config.read_file(filePtr, 1) ) // 1-keep system settings return 0; if( !read_book_mark( BOOK_MARK+103 ) ) return 0; if( !sys....
false
false
false
false
false
0
arc(const FXVec3f& f,const FXVec3f& t){ register FXfloat dot=f.x*t.x+f.y*t.y+f.z*t.z,div; if(dot> 0.999999f){ // Unit quaternion x= 0.0f; y= 0.0f; z= 0.0f; w= 1.0f; } else if(dot<-0.999999f){ // 180 quaternion if(fabsf(f.z)<fabsf(f.x) && fabsf(f.z)<fabs(f.y)){ // x, y large...
false
false
false
false
false
0
iosetip(int i, int offset) #endif { register expptr p; if(p = V(i)) if(p->tag==TADDR && ONEOF(p->addrblock.vtype, inqmask) ) { ioset_assign = OPASSIGNI; ioset(TYADDR, offset, addrof(cpexpr(p)) ); ioset_assign = OPASSIGN; } else errstr("impossible inquire parameter %s", ioc[i].iocname); else...
false
false
false
false
false
0
biasCriticalPath() { if (NumPreds < 2) return; SUnit::pred_iterator BestI = Preds.begin(); unsigned MaxDepth = BestI->getSUnit()->getDepth(); for (SUnit::pred_iterator I = std::next(BestI), E = Preds.end(); I != E; ++I) { if (I->getKind() == SDep::Data && I->getSUnit()->getDepth() > MaxDepth) ...
false
false
false
false
false
0
xfs_qm_dqput( struct xfs_dquot *dqp) { ASSERT(dqp->q_nrefs > 0); ASSERT(XFS_DQ_IS_LOCKED(dqp)); trace_xfs_dqput(dqp); if (--dqp->q_nrefs == 0) { struct xfs_quotainfo *qi = dqp->q_mount->m_quotainfo; trace_xfs_dqput_free(dqp); if (list_lru_add(&qi->qi_lru, &dqp->q_lru)) XFS_STATS_INC(dqp->q_mount, xs_qm...
false
false
false
false
false
0
rabbit_extract(rabbit_state *state, uint8_t *stream) { algorithm_round(state); uint16_t *s = (uint16_t*)stream; uint32_t *x = state->x; s[0] = (uint16_t) x[0] ^ (uint16_t)(x[5] >> 16); s[1] = (uint16_t)(x[0] >> 16) ^ (uint16_t) x[3]; s[2] = (uint16_t) x[2] ^ (uint16_t)(x[7] >> 16); s[3] = ...
false
false
false
false
false
0
mei_cl_read_cb(const struct mei_cl *cl, const struct file *fp) { struct mei_cl_cb *cb; list_for_each_entry(cb, &cl->rd_completed, list) if (!fp || fp == cb->file_object) return cb; return NULL; }
false
false
false
false
false
0
vrrp_auth_pass_handler(vector_t *strvec) { vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp); char *str = vector_slot(strvec, 1); int max_size = sizeof (vrrp->auth_data); int str_len = strlen(str); if (str_len > max_size) { str_len = max_size; log_message(LOG_INFO, "Truncating auth_pass to %d characters",...
false
true
false
false
false
1
board_flags(const board_t * board) { int flags; flags = 0; if (board->castle[White][SideH] != SquareNone) flags |= 1 << 0; if (board->castle[White][SideA] != SquareNone) flags |= 1 << 1; if (board->castle[Black][SideH] != SquareNone) flags |= 1 << 2; if (board->castle[Black][SideA] != SquareNone) f...
false
false
false
false
false
0
JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_SON_OF_FLAME) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { pSummoned->AI()->AttackStart(pTarget); } ++m_uiAddCount;...
false
false
false
false
false
0
Optimal_find_region(Optimal *optimal, Region *region, gpointer user_data, C4_Score threshold, SubOpt *subopt, C4_Score *region_score){ register Region *alignment_region; register Viterbi_Data *vd; register C4_Score score; g_assert(optimal->type & Optimal...
false
false
false
false
false
0
get_audio_frame_size(AVCodecContext *enc, int size) { int frame_size; if(enc->codec_id == CODEC_ID_VORBIS) return -1; if (enc->frame_size <= 1) { int bits_per_sample = av_get_bits_per_sample(enc->codec_id); if (bits_per_sample) { if (enc->channels == 0) ...
false
false
false
false
false
0
startDrag( Qt::DropActions supportedActions ) { //setSelectionMode( QAbstractItemView::NoSelection ); // When a parent item is dragged, startDrag() is called a bunch of times. Here we prevent that: m_dragMutex.lock(); if( m_ongoingDrag ) { m_dragMutex.unlock(); return; } m_on...
false
false
false
false
false
0
alias_search(const char *const *alist, int n, const char *s) { int i1 = 0; int i2 = n-1; int i; i = squeeze_compare(s, alist[i1]); if (i < 0) return -1; if (i == 0) return i1; i = squeeze_compare(s, alist[i2]); if (i > 0) return -1; if (i == 0) return i2; ...
false
false
false
false
false
0
garmin_gpi_read(void) { while (1) { int tag = gbfgetint32(fin); if (tag == 0xffff) { return; } if (! read_tag("garmin_gpi_read", tag, NULL)) { return; } }; }
false
false
false
false
false
0
DoAYSQ(int x) { int32 freq=((MapperExRAM[x<<1]|((MapperExRAM[(x<<1)+1]&15)<<8))+1)<<(4+17); int32 amp=(MapperExRAM[0x8+x]&15)<<2; int32 start,end; int V; amp+=amp>>1; start=CAYBC[x]; end=(SOUNDTS<<16)/soundtsinc; if(end<=start) return; CAYBC[x]=end; if(amp) for(V=start...
false
false
false
false
false
0
snic_issue_hba_reset(struct snic *snic, struct scsi_cmnd *sc) { struct snic_req_info *rqi = NULL; struct snic_host_req *req = NULL; spinlock_t *io_lock = NULL; DECLARE_COMPLETION_ONSTACK(wait); unsigned long flags; int ret = -ENOMEM; rqi = snic_req_init(snic, 0); if (!rqi) { ret = -ENOMEM; goto hba_rst_en...
false
false
false
false
false
0
trf7970a_mode_detect(struct trf7970a *trf, u8 *rf_tech) { int ret; u8 target_proto, tech; ret = trf7970a_read_target_proto(trf, &target_proto); if (ret) return ret; switch (target_proto) { case TRF79070A_NFC_TARGET_PROTOCOL_106A: tech = NFC_DIGITAL_RF_TECH_106A; break; case TRF79070A_NFC_TARGET_PROTOCOL_...
false
false
false
false
false
0
getName() { if ( name == NULL || name[0] == '\0' ) { initName(); } return name; }
false
false
false
false
false
0
do_map(Var key, Var value, void *data, int first) { struct do_map_closure *dmc = (struct do_map_closure *)data; dmc->status = generate_key(dmc->g, key, dmc->gctx); if (yajl_gen_status_ok != dmc->status) return 1; dmc->status = generate(dmc->g, value, dmc->gctx); if (yajl_gen_status_ok != dmc->stat...
false
false
false
false
false
0
grub_util_write_image_at (const void *img, size_t size, off_t offset, FILE *out, const char *name) { grub_util_info ("writing 0x%" GRUB_HOST_PRIxLONG_LONG " bytes at offset 0x%" GRUB_HOST_PRIxLONG_LONG, (unsigned long long) size, (unsigned long long) offset); if (fseeko (out, offset, SEEK_SET) == -1) ...
false
false
false
false
false
0
make_directory(const char *directory, /* I - Directory */ mode_t mode, /* I - Permissions */ uid_t owner, /* I - Owner ID */ gid_t group) /* I - Group ID */ { char buffer[8192], /* Filename buffer */ *bufptr; /* Pointer into buffer */ for (bufptr = buffer; *direc...
false
false
false
false
false
0
workArea( const QList<WId>& exclude, int desktop ) { init( INFO_WINDOWS ); // invalidates s_d_func's return value KWindowSystemPrivate* const s_d = s_d_func(); QRect all = QApplication::desktop()->geometry(); QRect a = all; if (desktop == -1) desktop = s_d->currentDesktop(); QList<WId...
false
false
false
false
false
0
gth_seq_con_delete(GthSeqCon *sc) { if (!sc) return; if (sc->c_class->free) sc->c_class->free(sc); gt_free(sc->pvt); gt_free(sc); }
false
false
false
false
false
0
smdEntry() { QRadioButton * radio = qobject_cast<QRadioButton *>(sender()); if (radio == NULL) return; emit smdChanged(radio == m_smd ? "smd" : "tht"); }
false
false
false
false
false
0
http_print_lines(char **list, int fd, int n) { int i; for(i = 0; i < n; i++) if(list[i]) if(fdprintf(fd, "%s\r\n", list[i]) == -1) return 1; if(write(fd, "\r\n", 2) != 2) return 1; return 0; }
false
false
false
false
false
0
chap_decode_string(char *encoded, uint8_t *decode_buf, int buf_len, int encoding_fmt) { if (encoding_fmt == HEX_FORMAT) { if ((strlen(encoded) - 2) > (2 * buf_len)) { eprintf("buf[%d] !sufficient to decode string[%d]\n", buf_len, (int) strlen(encoded)); return CHAP_TARGET_ERROR; } decode_hex_string(e...
false
false
false
false
false
0
BasicBlock_size(CTX ctx, kBasicBlock *bb, size_t c) { L_TAIL:; if(bb == NULL || BasicBlock_isVisited(bb)) return c; BasicBlock_setVisited(bb, 1); if(bb->nextNC != NULL) { if(BasicBlock_isVisited(bb) || BasicBlock_opcode(bb->nextNC) == OPCODE_RET) { kBasicBlock *bb2 = new_BasicBlockLABEL(ctx); bb2->jumpNC = ...
false
false
false
false
false
0
deleteSbrDec (SBR_CHANNEL * hSbrChannel) { HANDLE_SBR_DEC hs = &hSbrChannel->SbrDec; deleteSbrEnvelopeCalc (&hs->SbrCalculateEnvelope); /* delete QMF filter states */ if (hs->pSynQmfStates != NULL) { FreeRam_sbr_QmfStatesSynthesis(&hs->pSynQmfStates); } if (hs->pSbrOverlapBuffer != NULL) { FreeR...
false
false
false
false
false
0
build_x_compound_expr_from_list (tree list, const char *msg) { tree expr = TREE_VALUE (list); if (TREE_CHAIN (list)) { if (msg) pedwarn ("%s expression list treated as compound expression", msg); for (list = TREE_CHAIN (list); list; list = TREE_CHAIN (list)) expr = build_x_compound_expr (expr,...
false
false
false
false
false
0
rmHeap(long i,dh_type H) /* Remove item i from heap. */ { long j; if(H->pos[i]==0) return 0; j = H->h[H->n--]; if (i != j && H->kvec[j] <= H->kvec[i]) siftupHeap(j,H->pos[i],H); else if (i != j && H->kvec[j]>H->kvec[i]) siftdownHeap(j,H->pos[i],H); H->pos[i] = 0; return i; }
false
false
false
false
false
0
cg_read_stat(FILE *fp, struct cgroup_stat *cgroup_stat) { int ret = 0; char *line = NULL; size_t len = 0; ssize_t read_bytes; char *token; char *saveptr = NULL; read_bytes = getline(&line, &len, fp); if (read_bytes == -1) { ret = ECGEOF; goto out_free; } token = strtok_r(line, " ", &saveptr); if (!toke...
false
true
true
false
false
1
cue_print_track (FILE *fp, Track *track, int trackno) { Cdtext *cdtext = track_get_cdtext(track); int i; /* index */ if (NULL != track_get_filename(track)) { /* * always print filename for track 1, afterwards only * print filename if it differs from the previous track */ if (0 != strcmp(track_get_filen...
false
false
false
false
false
0
something_changed( GtkWidget *wid, gpointer d ) { UIPeriodType pt; GDate start; gboolean show_last, use_wd; GncRecurrence *gr = GNC_RECURRENCE(d); pt = get_pt_ui(gr); gnc_date_edit_get_gdate(GNC_DATE_EDIT(gr->gde_start), &start); if (pt == GNCR_MONTH) g_object_set(G_OBJECT(gr->nth...
false
false
false
false
false
0
QuestAccept_npc_tyrion(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_THE_ATTACK) { pCreature->GetMap()->MonsterYellToMap(pCreature->GetGUID(), -1000824, LANG_UNIVERSAL, pPlayer); // pCreature->SetFactionTemporary(FACTION_ENEMY, TEMPFACTION_RESTORE...
false
false
false
false
false
0
bgav_input_open_callbacks(int (*read_callback)(void * priv, uint8_t * data, int len), int64_t (*seek_callback)(void * priv, uint64_t pos, int whence), void * priv, const char * filename, const char * mimetype, int64_t total_bytes, ...
false
false
false
false
false
0
search_cb(sdp_list_t *recs, int err, gpointer user_data) { struct conn_mcl_data *conn_data = user_data; GError *gerr = NULL; bdaddr_t dst; uint16_t ccpsm; if (conn_data->dev->hdp_adapter->mi == NULL) { g_set_error(&gerr, HDP_ERROR, HDP_CONNECTION_ERROR, "Mcap instance released"); goto fail; } if (err...
false
false
false
false
false
0
usbhsg_recip_handler_std_get_device(struct usbhs_priv *priv, struct usbhsg_uep *uep, struct usb_ctrlrequest *ctrl) { struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); unsigned short status = 0; if (usbhsg_status_has(gpriv, USBHSG_STATUS_SELF_POWERED)) status = 1 << USB_DEVICE_SELF_POW...
false
false
false
false
false
0
finalize_task_copyfn (gimple task_stmt) { struct function *child_cfun; tree child_fn, old_fn; gimple_seq seq, new_seq; gimple bind; child_fn = gimple_omp_task_copy_fn (task_stmt); if (child_fn == NULL_TREE) return; child_cfun = DECL_STRUCT_FUNCTION (child_fn); /* Inform the callgraph about the ne...
false
false
false
false
false
0
func_set_code(PyFunctionObject *op, PyObject *value) { PyObject *tmp; Py_ssize_t nfree, nclosure; if (restricted()) return -1; /* Not legal to del f.func_code or to set it to anything * other than a code object. */ if (value == NULL || !PyCode_Check(value)) { PyErr_SetString(Py...
false
false
false
false
false
0
amdmsSolveLinear(amdmsFIT_LINEAR_ENV *env, int m, int n) { int jj, j, i; double s, tmp[amdmsMAX_COEFF + 1]; for (j = 1; j <= n; j++) { /* Calculate U T B */ s=0.0; if (env->vecW[j]) { /* Nonzero result only if wj is nonzero. */ for (i = 1; i <= m; i++) { s += env->matU[i][j]*env->...
false
false
false
false
false
0
get_enemy_opt(lua_State *L, int param_number, int optional) { const char *dialog = luaL_optstring(L, param_number, NULL); if (!dialog) return chat_control_chat_droid; enemy *en = get_enemy_with_dialog(dialog); if (!optional && !en) ErrorMessage(__FUNCTION__, _("Could not find a droid corresponding to the dial...
false
false
false
false
false
0
dce_process_block (basic_block bb, bool redo_out, bitmap au) { bitmap local_live = BITMAP_ALLOC (&dce_tmp_bitmap_obstack); rtx insn; bool block_changed; df_ref *def_rec; if (redo_out) { /* Need to redo the live_out set of this block if when one of the succs of this block has had a change in it li...
false
false
false
false
false
0
get_cslots(struct snd_ac97 *ac97) { unsigned short slots; if (!ac97_is_audio(ac97)) return 0; slots = (1<<AC97_SLOT_PCM_LEFT)|(1<<AC97_SLOT_PCM_RIGHT); slots |= (1<<AC97_SLOT_MIC); return slots; }
false
false
false
false
false
0
f81232_set_baudrate(struct usb_serial_port *port, speed_t baudrate) { u8 lcr; int divisor; int status = 0; divisor = calc_baud_divisor(baudrate); status = f81232_get_register(port, LINE_CONTROL_REGISTER, &lcr); /* get LCR */ if (status) { dev_err(&port->dev, "%s failed to get LCR: %d\n", __func__, stat...
false
false
false
false
false
0
errmsg(errcxdef *ctx, char *outbuf, uint outbufl, uint err) { uint last; uint first; uint cur; VARUSED(outbufl); /* run a binary search for the indicated error */ first = 0; last = (sizeof(errlist) / sizeof(errlist[0])) - 1; for (;;) { if (first > last) ...
false
true
false
false
false
1
findCookies(const QList<int> &fields, const QString &_domain, const QString &fqdn, const QString &path, const QString &name) { QStringList result; const bool allCookies = name.isEmpty(); const QString...
false
false
false
false
false
0
bnx2x_warpcore_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) { struct bnx2x *bp = params->bp; u32 serdes_net_if; u8 fiber_mode; u16 lane = bnx2x_get_warpcore_lane(phy, params); serdes_net_if = (REG_RD(bp, params->shmem_base + offsetof(struct shmem_...
false
false
false
false
false
0
procmsg_msginfo_get_tags_str(MsgInfo *msginfo) { GSList *cur = NULL; gchar *tags = NULL; if (!msginfo) return NULL; if (msginfo->tags == NULL) return NULL; for (cur = msginfo->tags; cur; cur = cur->next) { const gchar *tag = tags_get_tag(GPOINTER_TO_INT(cur->data)); if (!tag) continue; if (!tags) ...
false
false
false
false
false
0
gf_term_check_end_of_scene(GF_Terminal *term, Bool skip_interactions) { if (!term->root_scene) return 1; if (!skip_interactions) { /*if input sensors consider the scene runs forever*/ if (gf_list_count(term->input_streams)) return 0; if (gf_list_count(term->x3d_sensors)) return 0; } /*check no clocks are stil...
false
false
false
false
false
0
nfs3_stat_to_pre_op_attr (struct iatt *pre) { pre_op_attr poa = {0, }; /* Some performance translators return zero-filled stats when they * do not have up-to-date attributes. Need to handle this by not * returning these zeroed out attrs. */ poa.attributes_follow =...
false
false
false
false
false
0
gst_ogg_demux_plugin_init (GstPlugin * plugin) { GST_DEBUG_CATEGORY_INIT (gst_ogg_demux_debug, "oggdemux", 0, "ogg demuxer"); GST_DEBUG_CATEGORY_INIT (gst_ogg_demux_setup_debug, "oggdemux_setup", 0, "ogg demuxer setup stage when parsing pipeline"); #ifdef ENABLE_NLS GST_DEBUG ("binding text domain %s to lo...
false
false
false
false
false
0
rbug_demarshal_context_draw_unblock(struct rbug_proto_header *header) { uint32_t len = 0; uint32_t pos = 0; uint8_t *data = NULL; struct rbug_proto_context_draw_unblock *ret; if (!header) return NULL; if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_UNBLOCK) return NULL; pos = 0; len = header->length ...
false
false
false
false
false
0
HandleInput(int& key, cmCursesMainForm*, WINDOW* w) { // 10 == enter if (key == 10 || key == KEY_ENTER) { if (this->GetValueAsBool()) { this->SetValueAsBool(false); } else { this->SetValueAsBool(true); } touchwin(w); wrefresh(w); return true; } els...
false
false
false
false
false
0
stv6110x_read_reg(struct stv6110x_state *stv6110x, u8 reg, u8 *data) { int ret; const struct stv6110x_config *config = stv6110x->config; u8 b0[] = { reg }; u8 b1[] = { 0 }; struct i2c_msg msg[] = { { .addr = config->addr, .flags = 0, .buf = b0, .len = 1 }, { .addr = config->addr, .flags = I2C_M_RD, .buf = ...
false
false
false
false
false
0
handle_rvalue(ir_rvalue **pir) { if (this->in_assignee) return; if (!*pir) return; ir_dereference_array* orig_deref = (*pir)->as_dereference_array(); if (needs_lowering(orig_deref)) { ir_variable *var = convert_dereference_array(orig_deref, NULL, orig_deref); ...
false
false
false
false
false
0
configFormatParam(char *buf, int n) { char *str; int8_t ret = 0; if (!(str = (char *)aqCalloc(16, sizeof(char)))) { return ret; } ftoa(str, p[n], 10); ret = sprintf(buf, "%-17s\t\t%s\n", configParameterStrings[n], str); if (str) { aqFree(str, 16, sizeof(char)); } return ret; }
false
false
false
false
false
0
launcher_saved (GtkWidget *dialog, Launcher *launcher) { const char *uri; uri = panel_ditem_editor_get_uri (PANEL_DITEM_EDITOR (dialog)); if (panel_launcher_get_filename (uri) != NULL) uri = panel_launcher_get_filename (uri); if (uri && launcher->location && strcmp (uri, launcher->location)) { GSettings *s...
false
false
false
false
false
0
ml_image_create_truecolor(value sx, value sy) { CAMLparam2(sx, sy); CAMLlocal1(v); gdImagePtr im; im = gdImageCreateTrueColor(Int_val(sx), Int_val(sy)); if (!im) raise_constant(*(value *)caml_named_value("gdopen failed")); v = alloc_custom(&image_t_custom_operations, sizeof(GdWrapper), ...
false
false
false
false
false
0
tanrev(x, y, prj, phi, theta) const double x, y; struct prjprm *prj; double *phi, *theta; { double r; if (abs(prj->flag) != PRJSET) { if (vimostanset(prj)) return 1; } r = sqrt(x*x + y*y); if (r == 0.0) { *phi = 0.0; } else { *phi = atan2deg (x, -y); } *theta = atan2deg (pr...
false
false
false
false
false
0
j_as_req(krb5_audit_moddata auctx, krb5_boolean ev_success, krb5_audit_state *state) { krb5_error_code ret = 0; char *jout = NULL; ret = kau_j_as_req(ev_success, state, &jout); if (ret) return ret; k5_mutex_lock(&lock); fprintf(au_fd,"%s\n", jout); fflush(au_fd); k5_mut...
false
false
false
false
false
0
copy_to_voicemail(struct mixmonitor *mixmonitor, const char *ext, const char *filename) { struct vm_recipient *recipient = NULL; struct ast_vm_recording_data recording_data; if (ast_string_field_init(&recording_data, 512)) { ast_log(LOG_ERROR, "Failed to string_field_init, skipping copy_to_voicemail\n"); return;...
false
false
false
false
false
0
gfp_xdr_send(struct gfp_xdr *conn, const char *format, ...) { va_list ap; gfarm_error_t e; va_start(ap, format); e = gfp_xdr_vsend(conn, &format, &ap); va_end(ap); if (e != GFARM_ERR_NO_ERROR) { gflog_debug(GFARM_MSG_1001004, "gfp_xdr_vsend() failed: %s", gfarm_error_string(e)); return (e); } if (*f...
false
false
false
false
false
0
map_getcellp(struct map_data* m,int x,int y,cell_t cellchk) { int type; nullpo_ret(m); if(x < 0 || x >= m->xs - 1 || y < 0 || y >= m->ys - 1) { return (cellchk == CELL_CHKNOPASS); } type = m->gat[x+y*m->xs]; if(cellchk >= CELL_CHKWALL && cellchk < CELL_CHKNPC) type &= CELL_MASK; switch(cellchk) { case...
false
false
false
false
false
0
timbuart_handleinterrupt(int irq, void *devid) { struct timbuart_port *uart = (struct timbuart_port *)devid; if (ioread8(uart->port.membase + TIMBUART_IPR)) { uart->last_ier = ioread32(uart->port.membase + TIMBUART_IER); /* disable interrupts, the tasklet enables them again */ iowrite32(0, uart->port.membase ...
false
false
false
false
false
0
gsb_data_category_get_name_list ( gboolean set_debit, gboolean set_credit, gboolean set_special, gboolean set_split ) { GSList *return_list; GSList *tmp_list; GSList *debit_list = NULL; GSList *credit_list = NULL; return_list = NULL; /* fill debit_list and/or credit_list a...
false
false
false
false
false
0
gncs_get_widget (GNCSearchCoreType *fe) { GtkWidget *entry, *menu, *box; GNCSearchInt64 *fi = (GNCSearchInt64 *)fe; GNCSearchInt64Private *priv; g_return_val_if_fail (fi, NULL); g_return_val_if_fail (IS_GNCSEARCH_INT64 (fi), NULL); priv = _PRIVATE(fi); box = gtk_hbox_new (FALSE, 3); /...
false
false
false
false
false
0
aim_mpmsg_free(aim_session_t *sess, aim_mpmsg_t *mpm) { aim_mpmsg_section_t *cur; for (cur = mpm->parts; cur;) { aim_mpmsg_section_t *tmp; tmp = cur->next; free(cur->data); free(cur); cur = tmp; } mpm->numparts = 0; mpm->parts = NULL; return; }
false
false
false
false
false
0
action_set_as_wallpaper_callback (GtkAction *action, NautilusView *view) { GList *selection; /* Copy the item to Pictures/Wallpaper since it may be remote. Then set it as the current wallpaper. */ g_assert (NAUTILUS_IS_VIEW (view)); selection = nautilus_view_get_selection (view); if (can_set_wallp...
false
false
false
false
false
0