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
posttag_proc (const char *repository, const char *filter, void *closure) { char *cmdline; const char *srepos = Short_Repository (repository); struct pretag_proc_data *ppd = closure; /* %t = tag being added/moved/removed * %o = operation = "add" | "mov" | "del" * %b = branch mode = "?" (delete...
false
false
false
false
false
0
gth_menu_button_get_label (GthMenuButton *self) { g_return_val_if_fail (GTH_IS_MENU_BUTTON (self), NULL); return gtk_label_get_label (GTK_LABEL (self->priv->label_widget)); }
false
false
false
false
false
0
hash(Config config) { int i, j, value; value = 0; for (i = 0; i < HEIGHT; i++) { for (j = 0; j < WIDTH; j++) { value = value + convert[(int)config[i][j]]; value *= 6; } } return (value); }
false
false
false
false
false
0
match(const MDNode *Var, const MDNode *Expr, const DILocation *IA, unsigned Offset, bool indirect) const { return Var == Variable && Expr == Expression && dl->getInlinedAt() == IA && Offset == offset && indirect == IsIndirect; }
false
false
false
false
false
0
fiji_request_smu_specific_fw_load(struct pp_smumgr *smumgr, uint32_t fw_type) { if (fiji_is_hw_virtualization_enabled(smumgr)) { uint32_t masks = fiji_get_mask_for_firmware_type(fw_type); if (fiji_send_msg_to_smc_with_parameter_without_waiting(smumgr, PPSMC_MSG_LoadUcodes, masks)) printk(KERN_ERR "Fail to R...
false
false
false
false
false
0
SetActive(bool bActive) { time_t tNow = time(NULL); if (bActive) { if (theApp->IsConnected()) { if (m_tActivated == 0) { m_tActivated = tNow; } } } else { if (m_tActivated != 0) { m_nDlActiveTime += tNow - m_tActivated; m_tActivated = 0; } } }
false
false
false
false
false
0
g_logv(char *p) { switch (*p) { case '\0': case '1': case 'y': case 'Y': case 't': case 'T': return 1; case '0': case 'n': case 'N': case 'f': case 'F': break; default: error(0, 0, "Unknown logical '%s' - false assumed", p); break; } return 0; }
false
false
false
false
false
0
parse_dumpsds_opts(dump_info_t *dumpsds_opts, intn *curr_arg, intn argc, char *argv[]) { intn ret_value = SUCCEED; /* traverse the command and process each option */ #if defined(WIN386) || defined(DOS386) while ((*curr_arg < argc) && ((argv[*curr_arg]...
false
false
false
false
false
0
setFont(const String& font_name) { d_font = font_name.empty() ? 0 : &FontManager::getSingleton().get(font_name); }
false
false
false
false
false
0
_e_xsettings_font_set(void) { E_Font_Default *efd; E_Font_Properties *efp; efd = e_font_default_get("application"); if (efd && efd->font) { efp = e_font_fontconfig_name_parse(efd->font); if (efp->name) { Eina_Strbuf *buf; Eina_List *l; ...
false
false
false
false
false
0
gt_canvas_cairo_visit_track_post(GtCanvas *canvas, GT_UNUSED GtTrack *track, GtError *err) { double vspace = TRACK_VSPACE_DEFAULT; gt_assert(canvas && track); /* put track spacer after track */ if (gt_style_get_num(canvas->pvt->sty, "format", "track_vspace", &vspace, ...
false
false
false
false
false
0
svga_regset_size(const struct vga_regset *regset) { u8 count = 0; while (regset->regnum != VGA_REGSET_END_VAL) { count += regset->highbit - regset->lowbit + 1; regset ++; } return 1 << count; }
false
false
false
false
false
0
FixPolygonTopology(OGRPolygon& polygon) { OGRPolygon* poPolygon = &polygon; OGRPolygon* poPolygonTemp = NULL; OGRLinearRing* poExternalRing = poPolygon->getExteriorRing(); if (poExternalRing->getNumPoints() < 4) { CPLDebug("XPLANE", "Discarded degenerated polygon at line %d", nLineNumber); ...
false
false
false
false
false
0
complement(char *buffer, int buffer_len) { int len; char conv[ASCII]; unsigned char ch; len = 0; ch = '\0'; while (1) { if (memchr(buffer, ch, buffer_len) == NULL) conv[len++] = ch; if (++ch == '\0') break; } memcpy(buffer, conv, len); return len; }
true
true
false
false
false
1
doPlacement(MSLayoutVector *cvec_,MSLayoutVector *rvec_,int vp_,int hp_,int rs_,int cs_) { int r,c,aw,ah,nw,nh; int offset=highlightThickness()+shadowThickness()+margin(); MSLayoutEntry *entry; MSNodeItem *hp=mappedListHead(); MSNodeItem *np=hp; while((np=np->next())!=hp) { entry=(MSLayout...
false
false
false
false
false
0
list_sizegroups (GladeWidget * gwidget) { GladeProject *project = glade_widget_get_project (gwidget); GList *groups = NULL; const GList *list; for (list = glade_project_get_objects (project); list; list = list->next) { GladeWidget *iter = glade_widget_get_from_gobject (list->data); if (GTK_IS_S...
false
false
false
false
false
0
xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *msg, const xmlChar *str1) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, N...
false
false
false
false
false
0
gst_mss_demux_restart_tasks (GstMssDemux * mssdemux) { GSList *iter; for (iter = mssdemux->streams; iter; iter = g_slist_next (iter)) { GstMssDemuxStream *stream = iter->data; gst_uri_downloader_reset (stream->downloader); g_rec_mutex_unlock (&stream->download_lock); } g_rec_mutex_unlock (&mssdemux-...
false
false
false
false
false
0
Reporting_records(bool force_resend) { Arc::XMLNode sendingXMLrecords(Arc::NS("","http://eu-emi.eu/namespaces/2012/11/aggregatedcomputerecord"), "SummaryRecords"); Arc::XMLNode node = aggregationrecordset["SummaryRecord"]; while (node) { if ( force_resend ) { // force res...
false
false
false
false
false
0
open_record( void ) { char new_record_name[Z_FILENAME_MAX + Z_PATHNAME_MAX + 1]; /* If recording or playback is already on then complain */ if ( recording == ON || replaying == ON ) { output_line( "Recording or playback are already active." ); } else { /* Get reco...
false
false
false
false
false
0
cleanupSSL(void *baton) { _mhClientCtx_t *cctx = baton; sslCtx_t *ssl_ctx = cctx->ssl_ctx; if (ssl_ctx) { if (ssl_ctx->ssl) SSL_clear(ssl_ctx->ssl); SSL_CTX_free(ssl_ctx->ctx); } return APR_SUCCESS; }
false
false
false
false
false
0
store_fan_div(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) { u8 reg; int index = to_sensor_dev_attr(devattr)->index; struct fschmd_data *data = dev_get_drvdata(dev); /* supported values: 2, 4, 8 */ unsigned long v; int err; err = kstrtoul(buf, 10, &v); if (err) return...
false
false
false
false
false
0
fli_boxtype2frametype( int btype ) { if ( btype <= FL_EMBOSSED_BOX ) return btype; else if ( btype == FL_FLAT_BOX ) return FL_NO_FRAME; return FL_DOWN_FRAME; }
false
false
false
false
false
0
evcom_stream_read_resume (evcom_stream *stream) { stream->flags &= ~EVCOM_PAUSED; ev_timer_again(D_LOOP_(stream) &stream->timeout_watcher); if (stream->recv_action == stream_recv__wait_for_resume) { stream->recv_action = stream_recv__data; } if (ATTACHED(stream)) { ev_timer_again(D_LOOP_(stream) &stre...
false
false
false
false
false
0
setkeycodes_main(int argc, char **argv) { int fd; struct kbkeycode a; if (!(argc & 1) /* if even */ || argc < 2) { bb_show_usage(); } fd = get_console_fd_or_die(); while (argv[1]) { int sc = xstrtoul_range(argv[1], 16, 0, 0xe07f); if (sc >= 0xe000) { sc -= 0xe000; sc += 0x0080; } a.scancode = s...
false
false
false
false
false
0
nextchar(void) { int c, c2, ch; c = hqxchar(); if (c == -1) return -1; switch (state86 & 0xff00) { case 0x0000: c2 = hqxchar(); if (c2 == -1) return -1; ch = (c << 2) | (c2 >> 4); state86 = 0x0100 | (c2 & 0x0f); break; case 0x0100: ch = ((state86 & 0x0f) ...
false
false
false
false
true
1
repreorder(node *p, boolean *success) { /* traverses a binary tree, calling function tryrearr at a node before calling tryrearr at its descendants */ if (p == NULL) return; tryrearr(p, success); if (p->tip) return; if (!(*success)) repreorder(p->next->back, success); if (!(*success)) ...
false
false
false
false
false
0
gkd_secret_objects_lookup_collection (GkdSecretObjects *self, const gchar *caller, const gchar *path) { GckBuilder builder = GCK_BUILDER_INIT; GckObject *object = NULL; GError *error = NULL; GList *objects; GckSession *session; gchar *identifier; g_return_val_if_fail (GKD_S...
false
false
false
false
false
0
gncOwnerGetSlots(GncOwner* owner) { if (!owner) return NULL; switch (gncOwnerGetType(owner)) { case GNC_OWNER_CUSTOMER: case GNC_OWNER_VENDOR: case GNC_OWNER_EMPLOYEE: return qof_instance_get_slots(QOF_INSTANCE(owner->owner.undefined)); case GNC_OWNER_JOB: return gncOwnerGet...
false
false
false
false
false
0
stripRegisterPrefix(const char *RegName) { if (FullRegNames) return RegName; switch (RegName[0]) { case 'r': case 'f': case 'q': // for QPX case 'v': if (RegName[1] == 's') return RegName + 2; return RegName + 1; case 'c': if (RegName[1] == 'r') return RegName + 2; } return RegNa...
false
false
false
false
false
0
unroot_here(node* root, node** nodep, long nonodes) { node* tmpnode; double newl; /* used by unroot */ /* assumes bifurcation this is ok in the programs that use it */ newl = root->next->oldlen + root->next->next->oldlen; root->next->back->oldlen = newl; root->next->next->back->oldlen = newl; newl = ...
false
false
false
false
false
0
rects_equal(XRectangle *x, XRectangle *y) { return (x->x == y->x) && (x->y == y->y) && (x->width == y->width) && (x->height == y->height); }
false
false
false
false
false
0
process( char c ) { switch ( c ) { case '\n': xdg_machine_next_state = &xdg_entry; break; default: /* nullop */ break; } }
false
false
false
false
false
0
getDefaultTimerGroup() { TimerGroup *tmp = DefaultTimerGroup; sys::MemoryFence(); if (tmp) return tmp; sys::SmartScopedLock<true> Lock(*TimerLock); tmp = DefaultTimerGroup; if (!tmp) { tmp = new TimerGroup("Miscellaneous Ungrouped Timers"); sys::MemoryFence(); DefaultTimerGroup = tmp; } ...
false
false
false
false
false
0
make_word_array(struct yomi_entry_list *yl, int nr) { struct word_entry **array = malloc(sizeof(struct word_entry *) * nr); int nth = 0; struct yomi_entry *ye; for (ye = yl->head; ye; ye = ye->next) { int i; for (i = 0; i < ye->nr_entries; i++) { array[nth] = &ye->entries[i]; nth ++;...
false
false
false
false
true
1
tlan_handle_tx_eoc(struct net_device *dev, u16 host_int) { struct tlan_priv *priv = netdev_priv(dev); struct tlan_list *head_list; dma_addr_t head_list_phys; u32 ack = 1; host_int = 0; if (priv->tlan_rev < 0x30) { TLAN_DBG(TLAN_DEBUG_TX, "TRANSMIT: handling TX EOC (Head=%d Tail=%d) -- IRQ\n", priv...
false
false
false
false
false
0
onKeyPress(FXObject*,FXSelector,void* ptr){ FXEvent* event=(FXEvent*)ptr; if(isEnabled() && !(flags&FLAG_PRESSED)){ FXTRACE((200,"%s::onKeyPress %p keysym=0x%04x state=%04x\n",getClassName(),this,event->code,event->state)); if(event->code==KEY_space || event->code==KEY_KP_Space || event->code==KEY_Return ||...
false
false
false
false
false
0
createWordcloud(const QPoint & pos) { WordcloudContent * w = new WordcloudContent(this); initContent(w, pos); return w; }
false
false
false
false
false
0
mwifiex_send_processed_packet(struct mwifiex_private *priv, struct mwifiex_ra_list_tbl *ptr, int ptr_index, unsigned long ra_list_flags) __releases(&priv->wmm.ra_list_spinlock) { struct mwifiex_tx_param tx_param; struct mwifiex_adapter *adapter = priv->adapter; int ret = -1; struct sk_buff *sk...
false
false
false
false
false
0
NT_set_tree_style(void *dummy, AWT_canvas *ntw, AP_tree_sort type) { AWUSE(dummy); GB_transaction gb_dummy(ntw->gb_main); AWT_TREE(ntw)->check_update(ntw->gb_main); AWT_TREE(ntw)->set_tree_type(type); ntw->zoom_reset(); ntw->refresh(); }
false
false
false
false
false
0
compute_g_heu_updating(HMMWork *wrk, HTK_HMM_Dens *binfo) { VECT tmp, x, sum = 0.0; VECT *mean; VECT *var; VECT *bm = wrk->backmax; VECT *vec = wrk->OP_vec; short veclen = wrk->OP_veclen; if (binfo == NULL) return(LOG_ZERO); mean = binfo->mean; var = binfo->var->vec; tmp = 0.0; for (; veclen > 0...
false
false
false
false
false
0
IDirectFBPalette_SetEntriesYUV( IDirectFBPalette *thiz, const DFBColorYUV *entries, unsigned int num_entries, unsigned int offset ) { int i; CorePalette *palette; DIRECT_INTERFACE_GET_DA...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__com__BuiltInContainer_GetLast(struct __ecereNameSpace__ecere__com__BuiltInContainer * this) { return (struct __ecereNameSpace__ecere__com__IteratorPointer *)(this->data ? ((unsigned char *)this->data + (this->count * this->type->typeSize) - 1) : (((void *)0))); }
false
false
false
false
false
0
_ctl_eventenable(struct MPT3SAS_ADAPTER *ioc, void __user *arg) { struct mpt3_ioctl_eventenable karg; if (copy_from_user(&karg, arg, sizeof(karg))) { pr_err("failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); return -EFAULT; } dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, __f...
false
false
false
false
false
0
check_cmyk_color_model_comps(gx_device * dev) { gx_device_color_info * pcinfo = &dev->color_info; int ncomps = pcinfo->num_components; int cyan_c, magenta_c, yellow_c, black_c; const gx_cm_color_map_procs * pprocs; cm_map_proc_cmyk((...
false
false
false
false
false
0
rr_len(char prop, message_buff &buff, int ix, int len) { unsigned char *ptr; int x; switch (prop) { case 'd': /* a domain name */ case 'm': /* email address */ return dom_comprlen(buff, ix); case 'i': /* ipv4 number */ case 'l': /* 32-bit number */ case 't': return 4; case 's': /...
false
false
false
false
false
0
gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext * subtitlecontext, const gchar * codec_id, gpointer data, guint size) { GstCaps *caps = NULL; GstMatroskaTrackContext *context = (GstMatroskaTrackContext *) subtitlecontext; /* for backwards compatibility */ if (!g_ascii_strcasecmp (co...
false
false
false
false
false
0
calcWidth(bool) { // Only contributions from W + fermion. if (id1Abs != 24 || id2Abs > 18) return; // Check that above threshold. Kinematical factor. if (ps == 0.) return; widNow = preFac * ps * ( pow2(1. - mr2) + (1. + mr2) * mr1 - 2. * mr1 * mr1 ); // Combine with colour factor and CKM...
false
false
false
false
false
0
yes_quit_cb(GtkWidget *widget, gpointer data) { destroy_yesno_dialog(widget); if (!gtk_term_is_named(term)) file_select(GTK_FILE_CHOOSER_ACTION_SAVE, "Save Notebook As ...", "*.en", "untitled", G_CALLBACK(save_as_quit_cb), term_window); else { gtk_term_save(term,NULL); euler_exit(); } }
false
false
false
false
false
0
mpu6000SetReg(uint8_t reg, uint8_t val) { ((uint8_t *)&mpu6000TxBuf)[0] = MPU6000_WRITE_BIT | reg; ((uint8_t *)&mpu6000TxBuf)[1] = val; mpu6000Data.spiFlag = 0; spiTransaction(mpu6000Data.spi, &mpu6000RxBuf, &mpu6000TxBuf, 2); while (!mpu6000Data.spiFlag) ; }
false
false
false
false
false
0
arm_fastmul_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, int *total, bool speed) { enum machine_mode mode = GET_MODE (x); if (TARGET_THUMB1) { *total = thumb1_rtx_costs (x, code, outer_code); return true; } /* ??? should thumb2 use different costs? */ switch (c...
false
false
false
false
false
0
cui_load_right_menu(GtkBuilder *builder, GtkStatusIcon *trayicon) { GtkImageMenuItem *cui_item_tethering; GtkMenuItem *cui_item_quit; GdkPixbuf *image = NULL; GError *error = NULL; gtk_builder_add_from_file(builder, CUI_RIGHT_MENU_UI_PATH, &error); if (error != NULL) { printf("Error: %s\n", error->message); ...
false
false
false
false
false
0
isMarkedJNIWeakGlobalRef(Object *object) { int marked = IS_MARKED(object); if(marked) addConservativeRoot(object); else { TRACE_GC("Converting JNI weak global reference @%p to place holder", object); convertToPlaceholder(object); } return marked; }
false
false
false
false
false
0
gpk_session_is_idle (GpkSession *session) { gboolean ret; gboolean is_idle = FALSE; GError *error = NULL; GValue *value; /* no gnome-session */ if (session->priv->proxy_prop == NULL) { g_warning ("no gnome-session"); goto out; } value = g_new0(GValue, 1); /* find out if this change altered the inhibited ...
false
false
false
false
false
0
sim_key_generate(const char *uid) { char path[PATH_MAX]; RSA *keys = NULL; int res = -1; FILE *f = NULL; if (!RAND_status()) sim_seed_prng(); if (!(keys = RSA_generate_key(1024, RSA_F4, NULL, NULL))) { sim_errno = SIM_ERROR_RSA; goto cleanup; } snprintf(path, sizeof(path), "%s/%s.pem", sim_key_path, ui...
true
true
false
false
true
1
si4713_tx_tune_power(struct si4713_device *sdev, u8 power, u8 antcap) { int err; u8 val[SI4713_TXPWR_NRESP]; /* * .First byte = 0 * .Second byte = 0 * .Third byte = power * .Fourth byte = antcap */ u8 args[SI4713_TXPWR_NARGS] = { 0x00, 0x00, power, antcap, }; /* Map power values 1-87 to MIN...
false
false
false
false
false
0
nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) { struct nvmem_cell cell; int rc; if (!nvmem || !nvmem->regmap) return -EINVAL; rc = nvmem_cell_info_to_nvmem_cell(nvmem, info, &cell); if (IS_ERR_VALUE(rc)) return rc; return nvmem_cell_write(&cell, buf, ce...
false
false
false
false
false
0
makediffimage(jas_matrix_t *origdata, jas_matrix_t *recondata) { jas_image_t *diffimage; jas_matrix_t *diffdata[3]; int width; int height; int i; int j; int k; jas_image_cmptparm_t compparms[3]; jas_seqent_t a; jas_seqent_t b; width = jas_matrix_numcols(origdata); height = jas_matrix_numrows(origdata); f...
false
false
false
false
false
0
httpBackupRouteLog(HttpRoute *route) { MprPath info; mprAssert(route->logBackup); mprAssert(route->logSize > 100); lock(route); if (route->parent && route->parent->log == route->log) { httpBackupRouteLog(route->parent); route->log = route->parent->log; unlock(route); ...
false
false
false
false
false
0
is_applicable_mul(int arg1, int arg2) { arg1 = abs(arg1); arg2 = abs(arg2); if (arg1 == 0 || arg2 == 0) { return TRUE; } if ( abs( (int)(INT_MAX / arg1) ) >= arg2) { return TRUE; } return FALSE; }
false
false
false
false
false
0
on_memory_group_display(const MenuItem *menu_item) { guint i; for (i = 0; (1 << i) < bytes_per_group; i++); menu_item_set_active(menu_item + i + 1, TRUE); }
false
false
false
false
false
0
maybe_scale(int id, float s) { /* If ND-viewing is active, then a scaling motion is very confusing because it only applies to one 3d sub-space. Instead, I change the behaviour of the "scale" button to directly change the ND-transform of "id". FIXME. We should handle this case as motion, but that w...
false
false
false
false
false
0
set_reconnect_on_toggle(GtkWidget *reconnect_button, gpointer userdata) { Conversation *cr = (Conversation *)userdata; if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON (reconnect_button))) ay_add_auto_conversation(cr->local_user, cr->name, cr->is_public); else ay_remove_aut...
false
false
false
false
false
0
read(hsStream* S, plResManager* mgr) { plMessage::read(S, mgr); fType = S->readInt(); fState = S->readFloat(); if (S->getVer().isNewPlasma()) fID = S->readByte(); else fID = S->readInt(); clearEvents(); fEvents.setSizeNull(S->readInt()); for (size_t i=0; i<fEvents.getSiz...
false
false
false
false
false
0
expand_or_collapse_category (NemoPlacesSidebar *sidebar, SectionType section_type, gboolean expand) { switch (section_type) { case SECTION_COMPUTER: sidebar->my_computer_expanded = expand; break; case SECTION_DEVICES: sidebar->devices_...
false
false
false
false
false
0
HandleModSpellCritChanceShool(bool /*apply*/, bool Real) { // spells required only Real aura add/remove if (!Real) return; if (GetTarget()->GetTypeId() != TYPEID_PLAYER) return; for (int school = SPELL_SCHOOL_NORMAL; school < MAX_SPELL_SCHOOL; ++school) if (m_modifier.m_miscval...
false
false
false
false
false
0
filter_series (const double *x, double *y, const DATASET *dset, gretl_vector *A, gretl_vector *C, double y0) { int t1 = dset->t1; int t2 = dset->t2; int err; err = series_adjust_sample(x, &t1, &t2); if (!err) { err = filter_vector(x, y, t1, t2, A, C, y0); } return err; }
false
false
false
false
false
0
FormatLine (int Line) { if (Line<LineCount) return strdup (Lines[Line]->Msg);else return 0; }
false
false
false
false
false
0
AbortBload( void *theEnv) { struct callFunctionItem *bfPtr; for (bfPtr = BloadData(theEnv)->AbortBloadFunctions; bfPtr != NULL; bfPtr = bfPtr->next) { if (bfPtr->environmentAware) { (*bfPtr->func)(theEnv); } else { (* (void (*)(void)) bfPtr->func)...
false
false
false
false
false
0
slapi_be_set_readonly( Slapi_Backend *be, int readonly ) { if ( be == NULL ) return; if ( readonly ) be->be_restrictops |= SLAP_RESTRICT_OP_WRITES; else be->be_restrictops &= ~(SLAP_RESTRICT_OP_WRITES); }
false
false
false
false
false
0
tgt_mgmt(struct mgmt_task *mtask) { struct tgtadm_req *req = &mtask->req; struct tgtadm_rsp *rsp = &mtask->rsp; int lld_no, err = TGTADM_INVALID_REQUEST, len = mtask->bsize; if (!strlen(req->lld)) lld_no = 0; else { lld_no = get_driver_index(req->lld); if (lld_no < 0 || tgt_drivers[lld_no]->drv_state != DRI...
false
false
false
false
false
0
EnterEvadeMode() override { if (m_uiResetTimer) { m_creature->RemoveAllAurasOnEvade(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreatureAddon(true); m_creature->SetLootRecipient(NULL); m_cr...
false
false
false
false
false
0
_do_tick(void) { Ecore_Animator *animator; EINA_INLIST_FOREACH(animators, animator) { animator->just_added = EINA_FALSE; } EINA_INLIST_FOREACH(animators, animator) { if ((!animator->delete_me) && (!animator->suspended) && (!animator->just_added)) ...
false
false
false
false
false
0
nid_fmt(int4 node) { if (node == NOTNODEID) { strcpy(fmt_str, "?"); } else if (node == LOCAL) { strcpy(fmt_str, "local"); } else if (node == HOST2COMPNODE) { strcpy(fmt_str, "N"); /* * The "C" notation has been redfined from its original OTB definition * -- it now means "one per CPU". */ } else if (node ==...
false
true
false
false
false
1
ohci_flush_iso_completions(struct fw_iso_context *base) { struct iso_context *ctx = container_of(base, struct iso_context, base); int ret = 0; tasklet_disable(&ctx->context.tasklet); if (!test_and_set_bit_lock(0, &ctx->flushing_completions)) { context_tasklet((unsigned long)&ctx->context); switch (base->type...
false
false
false
false
false
0
inflow_constant_read (GtsObject ** o, GtsFile * fp) { GfsBoundary * b = GFS_BOUNDARY (*o); FttComponent c; GfsFunction * un = GFS_BOUNDARY_INFLOW_CONSTANT (*o)->un; GfsVariable ** v; if (GTS_OBJECT_CLASS (gfs_boundary_inflow_constant_class ())->parent_class->read) (* GTS_OBJECT_CLASS (gfs_boundary_infl...
false
false
false
false
false
0
backup_gtkrc(gchar *path_to_gtkrc) { FILE *gtkrc; if (!(gtkrc = fopen(path_to_gtkrc, "r"))) return; int c; FILE *gtkrc_backup = fopen(g_strdup_printf("%s/.gtkrc-2.0.bak", homedir),"w"); while((c = fgetc(gtkrc)) != EOF){ fputc(c, gtkrc_backup); } fclose(gtkrc); fclose(gtkrc_backup); }
false
false
false
false
false
0
GDALDatasetShadow_ReadRaster1(GDALDatasetShadow *self,int xoff,int yoff,int xsize,int ysize,void **buf,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0,int *buf_pixel_space=0,int *buf_line_space=0,int *buf_band_space=0){ int nxsize = (buf_xsize==0) ? xsize : *buf_xsize; ...
false
false
false
false
false
0
runThread(void *arg) { setThreadName("ArSignalHandler"); threadStarted(); // I think the old code was broken in that it didn't block all the // signals it wanted to wait for, which sigwait is supposed to // do... it also didn't check the return... for some reason system // on a debian box (at least a newer...
false
false
false
false
false
0
isp1760_init(void) { int ret, any_ret = -ENODEV; isp1760_init_kmem_once(); ret = platform_driver_register(&isp1760_plat_driver); if (!ret) any_ret = 0; #ifdef CONFIG_PCI ret = pci_register_driver(&isp1761_pci_driver); if (!ret) any_ret = 0; #endif if (any_ret) isp1760_deinit_kmem_cache(); return any_re...
false
false
false
false
false
0
read (ACEXML_Char *str, size_t len) { if (this->start_ != 0 && this->ptr_ != this->end_) { if (len * sizeof (ACEXML_Char) > (size_t) (this->end_ - this->ptr_)) len = this->end_ - this->ptr_; ACE_OS::strncpy (str, this->ptr_, len); this->ptr_ += len; return static_cast<int> (l...
false
false
false
false
false
0
gst_gio_error (gpointer element, const gchar * func_name, GError ** err, GstFlowReturn * ret) { gboolean handled = TRUE; if (ret) *ret = GST_FLOW_ERROR; if (GST_GIO_ERROR_MATCHES (*err, CANCELLED)) { GST_DEBUG_OBJECT (element, "blocking I/O call cancelled (%s)", func_name); if (ret) *ret =...
false
false
false
false
false
0
ui_acc_manage_remove(GtkWidget *widget, gpointer user_data) { struct ui_acc_manage_data *data; //Account *item; guint32 key; gboolean do_remove; data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data"); DB( g_print("\n(ui_acc_manage_remove) (data=%x)\n", (guint)data) ); do_...
false
false
false
false
false
0
find_branch(const char *version_string) { long version[20]; int version_length; int j; if (parent) { // // As a special case, the "grandparent" of a change is // repesented by a branch name of ".." as this is expected to be // the commonest variety of cross branch merge. // if (...
false
false
false
false
false
0
ms_showpic (type32 picture, type8 mode) { static glui32 current_crc = 0; /* CRC of the current picture */ type8 *bitmap, animated; type16 width, height, palette[GMS_PALETTE_SIZE]; long picture_bytes; glui32 crc; /* See if the mode indicates no graphics. */ if (mode == 0) { /* Note...
false
false
false
false
false
0
set_dim_order_by_self( Ic_array_table *array_list ) { Ic_array_table *ic_array; Ic_entry_table *black; int i, j; int dim; int *critical_dim; int *critical_count_times; for( ic_array = array_list; ic_array; ic_array = ic_array->next ){ dim = ic_array->dim; critical_dim = malloc_int_p( ...
false
false
false
false
false
0
VSgetblockinfo(int32 vkey, /* IN: vdata id */ int32* block_size, /* OUT: length used for each linked-block */ int32* num_blocks) /* OUT: number of blocks the element has */ { vsinstance_t *w = NULL; VDATA *vs = NULL; intn ret_value = SUCCEED; CONSTR(FUNC, "VSg...
false
false
false
false
false
0
enableRule(int rule_n) { FWObject* o =getRuleByNum( rule_n ); if (o) { (Rule::cast(o))->enable(); return true; } return false; }
false
false
false
false
false
0
hpsa_ioaccel_submit(struct ctlr_info *h, struct CommandList *c, struct scsi_cmnd *cmd, unsigned char *scsi3addr) { struct hpsa_scsi_dev_t *dev = cmd->device->hostdata; int rc = IO_ACCEL_INELIGIBLE; cmd->host_scribble = (unsigned char *) c; if (dev->offload_enabled) { hpsa_cmd_init(h, c->cmdindex, c); c->c...
false
false
false
false
false
0
CurrentCamera(ClientData cl,Tcl_Interp *interp,int argc,char **argv) { camera_t *cam; int i; if ( argc != 2 ) { sprintf( interp->result, "camera: wrong number of arguments\n" ); return TCL_ERROR; } i = 0; for( cam=Camera; cam!=NULL; cam=cam->Next,i++ ) { if ( st...
false
false
false
false
false
0
catfile(dccrec *d, char *filename) { FILE *f; char s[BUFSIZ]; f = fopen(filename,"r"); if(f == NULL) { Log_write(LOG_MAIN|LOG_ERROR,"*","No such file \"%s\".",filename); DCC_write(d,"Sorry, the owner has not created \"%s\".",filename); return; } if(!isfile(filename)) { fclose(f); Log_write(LOG_ERROR...
false
false
false
false
false
0
panel_launcher_find_writable_uri (const char *launcher_location, const char *source) { char *path; char *uri; if (!launcher_location) return panel_make_unique_desktop_uri (NULL, source); if (!strchr (launcher_location, G_DIR_SEPARATOR)) { path = panel_make_full_path (NULL, launcher_location); uri = g_...
false
false
false
false
false
0
_mesa_update_modelview_project( struct gl_context *ctx, GLuint new_state ) { if (new_state & _NEW_MODELVIEW) { _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); /* Bring cull position up to date. */ TRANSFORM_POINT3( ctx->Transform.CullObjPos, ctx->ModelviewMatrixStack.Top->inv...
false
false
false
false
false
0
hash_to_xml_string (gpointer key, gpointer value, gpointer user_data) { CategoryInfo *cat_info = value; GString *string = user_data; gchar *category; g_string_append_len (string, " <category", 11); if (cat_info->is_default && cat_info->clocale_name && *cat_info->clocale_n...
false
false
false
false
false
0
isAcceptableSID(const Jid &peer, const QString &sid) const { QString key = makeKey(sid, d->client->jid(), peer); QString key_out = makeKey(sid, peer, d->client->jid()); //not valid in muc via proxy // if we have a server, then check through it if(d->serv) { if(findServerEntryByHash(key) || findServerEntryByHash(...
false
false
false
false
false
0
process_label(Label l, Graph g, int adjust) { float len, height; int f, i; float fnl, tmp; char *s; if (l->label == CNULL) return; if (adjust) { l->x = ctop(l->x, g->x_axis); l->y = ctop(l->y, g->y_axis); } if (l->linesep == FSIG) l->linesep = l->fontsize; l->nlines = 0; for (i = 0; l->la...
false
false
false
false
false
0
fut_setup( unsigned int nlongs, unsigned int keymask, unsigned int threadid ) { unsigned int nbytes; unsigned long *iptr; /* paranoia, so nobody waits for us while we are in here */ fut_active = 0; fut = fxt_setinfos(FXT_SPACE_USER); fut_infos = fxt_infos(fut); /* remember pid of process that called setup *...
false
false
false
false
false
0
nls_list_bound_vars(nls_node **tree, nls_node *var) { nls_node **item, *tmp; nls_list_foreach((*tree), &item, &tmp) { nls_bound_vars(item, var); } }
false
false
false
false
false
0
copy_result_to_user(struct dlm_user_args *ua, int compat, uint32_t flags, int mode, int copy_lvb, char __user *buf, size_t count) { #ifdef CONFIG_COMPAT struct dlm_lock_result32 result32; #endif struct dlm_lock_result result; void *resultptr; int error=0; int len; int struct_len; memset(&res...
false
false
false
false
false
0
bld2_flat_itree(struct itree_t *new_itp) { register int32 ii; struct inst_t *ip; struct itree_t *itp; struct mod_t *up_imdp, *imdp; up_imdp = new_itp->itip->imsym->el.emdp; /* if mod has no insts empty minsts ptr tab and empty up_itp ptr table */ if (up_imdp->minum == 0) return; /* allocate pointer to contain...
false
false
false
false
false
0