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
write_cert_key_file (const char *path, const GByteArray *data, GError **error) { char *tmppath; int fd = -1, written; gboolean success = FALSE; tmppath = g_malloc0 (strlen (path) + 10); g_assert (tmppath); memcpy (tmppath, path, strlen (path)); strcat (tmppath, ".XXXXXX...
false
false
false
false
false
0
btree_clear(btree* root, BOOLEAN destroy_data){//iterate in postfix order dlist *freer = NULL; btree_iterator_pre* it = btree_iterator_pre_new(root, &(btree_iterator_pre){}); btree *next; for(next = btree_iterator_pre_next(it); next; next = btree_iterator_pre_next(it)){ freer = dlist_pushback(freer, (Object*)next...
false
false
false
false
false
0
readBYTE(bool *ok) { ByteVector v = readBlock(1); if(v.size() != 1) { if(ok) *ok = false; return 0; } if(ok) *ok = true; return v[0]; }
false
false
false
false
false
0
foundin_ptr(GtkTreeIter *iter) { const struct spptr *pp; guint seq; gtk_tree_model_get(GTK_TREE_MODEL(sorted_plist_store), iter, SEQ_COL, &seq, -1); pp = &Ptr_seg.pp_ptrs[seq]->p; if (srch_form && smatch_in(pp->spp_form)) return 1; if (srch_ptr && smatch_in(pp->spp_ptr)) return 1; if (srch_dev...
false
false
false
false
false
0
__acl_init_targetattrfilter( Targetattrfilter *attrfilter, char *str ) { char *tmp_ptr, *s, *filter_ptr; Slapi_Filter *f = NULL; s = str; /* First grab the attribute name */ if ( (tmp_ptr = strstr( str, ":")) == NULL ) { /* No :, syntax error */ slapi_log_error(SLAPI_LOG_ACL, plugin_name...
false
false
false
false
false
0
iio_read_first_n_kfifo(struct iio_buffer *r, size_t n, char __user *buf) { int ret, copied; struct iio_kfifo *kf = iio_to_kfifo(r); if (mutex_lock_interruptible(&kf->user_lock)) return -ERESTARTSYS; if (!kfifo_initialized(&kf->kf) || n < kfifo_esize(&kf->kf)) ret = -EINVAL; else ret = kfifo_to_user(&...
false
false
false
false
false
0
intel_ddi_get_crtc_encoder(struct drm_crtc *crtc) { struct drm_device *dev = crtc->dev; struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_encoder *intel_encoder, *ret = NULL; int num_encoders = 0; for_each_encoder_on_crtc(dev, crtc, intel_encoder) { ret = intel_encoder; num_encoders++; } if...
false
false
false
false
false
0
gt_sainseq_getchar(const GtSainseq *sainseq, unsigned long position) { GtUchar cc; gt_assert(position < sainseq->totallength); #ifdef GT_SAIN_WITHCOUNTS gt_sain_countcharaccess++; #endif return (sainseq->seqtype == GT_SAIN_PLAINSEQ) ? (unsigned long) sainseq->se...
false
false
false
false
false
0
amitk_canvas_update_target(AmitkCanvas * canvas, AmitkCanvasTargetAction action, AmitkPoint center, amide_real_t thickness) { g_return_if_fail(AMITK_IS_CANVAS(canvas)); canvas->next_target_action = action; canvas->next_target_center = center; canvas->next_target_thickness = thickness; canvas_add_u...
false
false
false
false
false
0
mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter) { if (c < 0x80) { if (c < 0) { filter->flag = 1; /* bad */ } else if (filter->status) { filter->flag = 1; /* bad */ } filter->status = 0; } else if (c < 0xc0) { switch (filter->status) { case 0x20: /* 3 byte code 2nd char */ case 0x30: /* ...
false
false
false
false
false
0
NPP_GetValue(NPP instance, NPPVariable variable, void *value) { g_debug ("NPP_GetValue called"); switch (variable) { case NPPVpluginScriptableNPObject: g_debug ("creating scriptable object"); init_methods_and_properties (); *(NPObject**)value = funcs.createobject (instan...
false
false
false
false
false
0
Balloc #ifdef KR_headers (k) int k; #else (int k) #endif { int x; Bigint *rv; #ifndef Omit_Private_Memory unsigned int len; #endif ACQUIRE_DTOA_LOCK(0); if ((rv = freelist[k])) { freelist[k] = rv->next; } else { x = 1 << k; #ifdef Omit_Private_Memory rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(...
false
false
false
false
false
0
walkStatEntryTree(TSVectorStat *stat) { StatEntry *node = stat->stack[stat->stackpos]; if (node == NULL) return NULL; if (node->ndoc != 0) { /* return entry itself: we already was at left sublink */ return node; } else if (node->right && node->right != stat->stack[stat->stackpos + 1]) { /* go on right...
false
false
false
false
false
0
xlsx_write_cellXfs (XLSXWriteState *state, GsfXMLOut *xml, GHashTable *fills_hash, GHashTable *num_format_hash, GHashTable *fonts_hash, GHashTable *border_hash) { if (state->styles_array->len > 0) { unsigned i; gsf_xml_out_start_element (xml, "cellXfs"); gsf_xml_out_add_int (xml, "count", state->styl...
false
false
false
false
false
0
bill_class (lease, class) struct lease *lease; struct class *class; { int i; if (lease -> billing_class) { log_error ("lease billed with existing billing arrangement."); unbill_class (lease, lease -> billing_class); } if (class -> leases_consumed == class -> lease_limit) return 0; for (i = 0; i < class ...
false
false
false
false
false
0
incompatibleTypes() { if (e1->type->toBasetype() != Type::terror && e2->type->toBasetype() != Type::terror ) { // CondExp uses 'a ? b : c' but we're comparing 'b : c' TOK thisOp = (op == TOKquestion) ? TOKcolon : op; if (e1->op == TOKtype || e2->op == TOKtype) { ...
false
false
false
false
false
0
av7110_debiwrite(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count) { struct saa7146_dev *dev = av7110->dev; if (count > 32764) { printk("%s: invalid count %d\n", __func__, count); return -1; } if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) { printk("%s: wait_for_debi_done ...
false
false
false
false
false
0
cpl_vector_filter_lowpass_create( const cpl_vector * v, cpl_lowpass filter_type, cpl_size hw) { cpl_vector * filtered; cpl_vector * kernel; double replace; cpl_size i, j; cpl_ensure(v != NULL, CPL_ERROR_NULL_INPUT, NULL); cpl_ensure(hw >= 0,...
false
false
false
false
false
0
main_gui_page_visibility_change(int page_num, gboolean visible) { GSList *iter; g_return_if_fail(UNSIGNED(page_num) < nb_main_page_num); iter = visibility_listeners[page_num]; for (/* NOTHING */; NULL != iter; iter = g_slist_next(iter)) { main_gui_visibility_cb func = cast_pointer_to_func(iter->data); g_asse...
false
false
false
false
false
0
tsys02d_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int val, int val2, long mask) { struct ms_ht_dev *dev_data = iio_priv(indio_dev); int i, ret; switch (mask) { case IIO_CHAN_INFO_SAMP_FREQ: i = ARRAY_SIZE(tsys02d_samp_freq); while (i-- > 0) if (val == tsys02d_sam...
false
false
false
false
false
0
delayTimeout() { QMutexLocker locker( &m_dirsMutex ); if( m_blocked || m_aborted ) return; if( m_scanDirsRequested.isEmpty() ) return; emit requestScan( m_scanDirsRequested.toList(), GenericScanManager::PartialUpdateScan ); m_scanDirsRequested.clear(); }
false
false
false
false
false
0
GetFileInfo(const char* path, bool &isLink, wxLongLong* size, wxDateTime* modificationTime, int *mode) { struct stat buf; int result = lstat(path, &buf); if (result) { isLink = false; if (size) *size = -1; if (mode) *mode = -1; if (modificationTime) *modificationTime = wxDateTime(); return unknow...
false
false
false
false
false
0
extend_(jl_value_t *var, jl_value_t *val, cenv_t *soln, int allow) { if (!allow && var == val) return; if (soln->n >= sizeof(soln->data)/sizeof(void*)) jl_error("type too large"); soln->data[soln->n++] = var; soln->data[soln->n++] = val; }
false
false
false
false
false
0
of_ptr(const struct optioninfo *oi, const char *arg, const char *arg2) { struct query_node *qun; int quflags, r; struct sockaddr_in sa; memset(&sa,0,sizeof(sa)); sa.sin_family= AF_INET; if (!inet_aton(arg,&sa.sin_addr)) usageerr("invalid IP address %s",arg); prep_query(&qun,&quflags); qun->owner= xstr...
false
false
false
false
false
0
setCurrentTranslate(const FloatPoint &translation) { m_translation = translation; if (parentNode() == document() && document()->renderer()) document()->renderer()->repaint(); }
false
false
false
false
false
0
length_ChangePasswdDataMS(const ChangePasswdDataMS *data) { size_t ret = 0; { size_t Top_tag_oldret = ret; ret = 0; ret += der_length_octet_string(&(data)->newpasswd); ret += 1 + der_length_len (ret); ret += 1 + der_length_len (ret); ret += Top_tag_oldret; } if((data)->targname){ size_t Top_tag_oldret = ret; ret = 0; r...
false
false
false
false
false
0
ixgbe_set_rx_mode(struct net_device *netdev) { struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_hw *hw = &adapter->hw; u32 fctrl, vmolr = IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE; int count; /* Check for Promiscuous and All Multicast modes */ fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); /* set all bits ...
false
false
false
false
false
0
repo_init_reinit(git_repository **repo_out, const char *repository_path, int is_bare) { git_repository *repo = NULL; GIT_UNUSED(is_bare); if (git_repository_open(&repo, repository_path) < 0) return -1; if (check_repositoryformatversion(repo) < 0) { git_repository_free(repo); return -1; } /* TODO: reinit...
false
false
false
false
false
0
up_backend_get_used_swap (UpBackend *backend) { gchar *contents = NULL; gchar **lines = NULL; GError *error = NULL; gchar **tokens; gboolean ret; guint active = 0; guint swap_free = 0; guint swap_total = 0; guint len; guint i; gfloat percentage = 0.0f; const gchar *filename = "/proc/meminfo"; /* get memor...
false
false
false
false
false
0
peek_token(char* buffer) { bool eq_found = false; bool nl_found = false; bool mc_found = false; flags->equalSignPeeked = eq_found; flags->newlinePeeked = nl_found; flags->matcPeeked = mc_found; buffer[0] = '\0'; if (bufferAtEnd()) { return false; } push_flags(); int old_pos = readBufferPos...
false
false
false
false
false
0
ml_get_font(value i) { CAMLparam1(i); CAMLlocal1(v); v = alloc_custom(&font_t_custom_operations, sizeof(GdFWrapper), 1, 10); if (!fonts_init) { fonts[0] = gdFontTiny; fonts[1] = gdFontSmall; fonts[2] = gdFontMediumBold; fonts[3] = gdFontLarge; fonts[4] = gdFontGiant; fonts_init = 1; ...
false
false
false
false
false
0
initialize_tree(struct clause *giv_cl) { struct link_node *tree, *given, *dummy_target; dummy_target = NULL; if ((tree = get_link_node()) != NULL) { /* initializing top dummy node */ tree->parent = NULL; tree->next_sibling = NULL; tree->prev_sibling = NULL; tree->near_poss_nuc...
false
false
false
false
false
0
gda_data_proxy_undelete (GdaDataProxy *proxy, gint proxy_row) { RowModif *rm = NULL; gboolean do_signal = FALSE; gint model_row; g_return_if_fail (GDA_IS_DATA_PROXY (proxy)); g_return_if_fail (proxy->priv); g_return_if_fail (proxy_row >= 0); gda_mutex_lock (proxy->priv->mutex); /* ensure that there is no syn...
false
false
false
false
false
0
generate_permute_function() { if (already_generated_permute_function) return; else already_generated_permute_function = TRUE; if (useless) { fprintf(codefile, "void %s::Permute(PermSet& Perm, int i) {}\n", mu_name); } else { fprintf(codefile, ...
false
false
false
false
false
0
qib_lkey_ok(struct qib_lkey_table *rkt, struct qib_pd *pd, struct qib_sge *isge, struct ib_sge *sge, int acc) { struct qib_mregion *mr; unsigned n, m; size_t off; /* * We use LKEY == zero for kernel virtual addresses * (see qib_get_dma_mr and qib_dma.c). */ rcu_read_lock(); if (sge->lkey == 0) { struct...
false
false
false
false
false
0
HashStringKey(tablePtr, keyPtr) Tcl_HashTable *tablePtr; /* Hash table. */ VOID *keyPtr; /* Key from which to compute hash value. */ { register CONST char *string = (CONST char *) keyPtr; register unsigned int result; register int c; /* * I tried a zillion different hash functions and ask...
false
false
false
false
false
0
gst_vc1_parse_detect (GstBaseParse * parse, GstBuffer * buffer) { GstVC1Parse *vc1parse = GST_VC1_PARSE (parse); GstMapInfo minfo; guint8 *data; gint size; if (!vc1parse->detecting_stream_format) return GST_FLOW_OK; if (!gst_buffer_map (buffer, &minfo, GST_MAP_READ)) return GST_FLOW_ERROR; data...
false
false
false
false
false
0
ht_remove(hashtab_t * hashtable, void *key, size_t keylen) { hashtab_node_t *last_node, *next_node; int index = ht_hash(key, keylen, hashtable->size); next_node = hashtable->arr[index]; last_node = NULL; while (next_node != NULL) { if (next_node->keylen == keylen) { /* compare keys */ if...
false
false
false
false
false
0
get_bg_tile_info(int tile_index) { int offs = tile_index * 2; int attr = psychic5_bg_videoram[offs + 1]; int code = psychic5_bg_videoram[offs] + ((attr & 0xc0) << 2); int color = attr & 0x0f; int flags = ((attr & 0x10) ? TILE_FLIPX : 0) + ((attr & 0x20) ? TILE_FLIPY : 0); SET_TILE_INFO(1, code, color, fl...
false
false
false
false
false
0
setout(v) vari *v; { INT i, i0; char md; i0 = getarg(v,"file",1); if (i0==0) { if (ofile!=NULL) fclose(ofile); ofile = NULL; printe("Output set to stdout\n"); return; } md = 'w'; i = getarg(v,"mode",1); if ((i>0) && (argval(v,i)[0]=='a')) md = 'a'; setfilename(argval(v,i0),"",&md,0); i...
false
false
false
false
true
1
free_node (Dt_t*d, gmlnode* p, Dtdisc_t* ds) { if (!p) return; if (p->attrlist) dtclose (p->attrlist); free (p); }
false
false
false
false
false
0
setFermionLine(int position, HelicityParticle& p0, HelicityParticle& p1) { vector< Wave4 > u0, u1; // First particle is incoming and particle, or outgoing and anti-particle. if (p0.id()*p0.direction < 0) { pMap[position] = position; pMap[position+1] = position+1; for (int h = 0; h < p0.spinStates()...
false
false
false
false
false
0
map_find_skill_unit_oncell(struct block_list *target,int x,int y,int skill_id,struct skill_unit *out_unit) { int m, bx, by; struct block_list *bl; struct skill_unit *unit; nullpo_retr(0, target); m = target->m; if(x < 0 || y < 0 || x >= map[m].xs || y >= map[m].ys) return NULL; bx = x / BLOCK_SIZE; by = y...
false
false
false
false
false
0
parse_pos(char **cmd) { size_t pos = EPOS; Win *win = vis->win->win; Text *txt = vis->win->text->data; Mark *marks = vis->win->text->marks; switch (**cmd) { case '.': pos = text_line_begin(txt, window_cursor_get(win)); (*cmd)++; break; case '$': pos = text_size(txt); (*cmd)++; break; case '\'': (*...
false
false
false
false
false
0
LLVMCreateTypeHandle(LLVMTypeRef PotentiallyAbstractTy) { return wrap(new PATypeHolder(unwrap(PotentiallyAbstractTy))); }
false
false
false
false
false
0
ptrobj_rewind(t_ptrobj *x) { t_scalar *sc; t_symbol *templatesym; int n; t_typedout *to; t_glist *glist; t_pd *canvas; t_gstub *gs; if (!gpointer_check(&x->x_gp, 1)) { pd_error(x, "pointer_rewind: empty pointer"); return; } gs = x->x_gp.gp_stub; if (gs->gs...
false
false
false
false
false
0
findServerEntryByHash(const QString &key) const { const QList<S5BManager*> &manList = d->serv->managerList(); foreach(S5BManager *m, manList) { Entry *e = m->findEntryByHash(key); if(e) return e; } return 0; }
false
false
false
false
false
0
sync_array_validate( /*================*/ sync_array_t* arr) /*!< in: sync wait array */ { ulint i; sync_cell_t* cell; ulint count = 0; sync_array_enter(arr); for (i = 0; i < arr->n_cells; i++) { cell = sync_array_get_nth_cell(arr, i); if (cell->wait_object != NULL) { count++; } } ut_a(count == a...
false
false
false
false
false
0
check_loop_mode(int argc, char* argv[], int force) { int i; int loop_mode = 0, loop_sleep = 2000, loop_max = 0; if (force) { loop_mode = 1; } for (i=1; i < argc; i++) { char *p = argv[i]; if (strstr(p, "--") == p) { p++; } if (strstr(p, "-loop") == p) { char *q; loop_mode = 1; if ((q = strch...
false
false
false
false
false
0
get_metadata_fast_async (GDBusConnection *connection, GFile *file, const gchar *mime_type, const gchar *graph, GCancellable *cancellable, GSimpleAsyncResult *r...
false
false
false
false
false
0
mei_me_quirk_probe(struct pci_dev *pdev, const struct mei_cfg *cfg) { if (cfg->quirk_probe && cfg->quirk_probe(pdev)) { dev_info(&pdev->dev, "Device doesn't have valid ME Interface\n"); return false; } return true; }
false
false
false
false
false
0
resample_nearest (void *dest_buf, void *source_buf, gint dest_w, gint dest_h, gint source_w, gint source_h, gdouble offset_x, gdouble offset_y, gdouble scale, ...
false
true
false
false
false
1
table_setdefault(register tableobject *self, PyObject *args) { PyObject *key; PyObject *failobj = NULL; PyObject *val = NULL; char *k = NULL; const char *v = NULL; if (!PyArg_ParseTuple(args, "O|O:setdefault", &key, &failobj)) return NULL; if (!PyString_CheckExact(key)) { P...
false
false
false
false
false
0
snd_ice1712_capture_pointer(struct snd_pcm_substream *substream) { struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); size_t ptr; if (!(snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL) & 1)) return 0; ptr = inl(ICEREG(ice, CONCAP_ADDR)) - ice->capture_con_virt_addr; ptr = bytes_to_frames(substream->runtim...
false
false
false
false
false
0
getwinsize(void) { static int initialized, envlines, envcols, deflines, defcols; #ifdef TIOCGWINSZ struct winsize winsz; int badioctl; #endif char *p; if (initialized == 0) { if ((p = getenv("LINES")) != NULL && *p != '\0') if ((envlines = atoi(p)) < 0) envlines = 0; if ((p = getenv("COLUMNS")) != NULL...
false
false
false
false
false
0
addNeededShortref(const StringC &str) { if (!shortrefTable_.lookup(str)) { shortrefTable_.insert(str, shortrefs_.size()); shortrefs_.push_back(str); } }
false
false
false
false
false
0
giraffe_table_load(GiTable *self, const cxchar *filename, cxint position, const cxchar *id) { const cxchar *fctid = "giraffe_table_load"; if (!self || !filename) { return 1; } self->data = cpl_table_load((cxchar *)filename, position, 0); if (!self->data) { if (...
false
false
false
false
false
0
isValid(const QString &eraName, int yearInEra, int month, int day) const { Q_D(const KCalendarSystem); KCalendarEra era = d->era(eraName, yearInEra); return (era.isValid() && isValid(era.year(yearInEra), month, day)); }
false
false
false
false
false
0
dsp_read( rel_time_t time ) { RUN_DSP( time, reg_times [REGS [r_dspaddr] & 0x7F] ); int result = dsp.read( REGS [r_dspaddr] & 0x7F ); #ifdef SPC_DSP_READ_HOOK SPC_DSP_READ_HOOK( spc_time + time, (REGS [r_dspaddr] & 0x7F), result ); #endif return result; }
false
false
false
false
false
0
intersect_box_box(const SbBox3f & box1, const SbBox3f & box2) { return ! (box1.getMin()[0] >= box2.getMax()[0] || box1.getMax()[0] < box2.getMin()[0] || box1.getMin()[1] >= box2.getMax()[1] || box1.getMax()[1] < box2.getMin()[1] || box1.getMin()[2] >= box2.getMax()[2] |...
false
false
false
false
false
0
gda_report_engine_declare_object (GdaReportEngine *engine, GObject *object, const gchar *obj_name) { gchar prefix, *real_name; GObject *current_obj; g_return_if_fail (GDA_IS_REPORT_ENGINE (engine)); g_return_if_fail (engine->priv); g_return_if_fail (G_IS_OBJECT (object)); g_return_if_fail (obj_name); if (GDA_IS...
false
false
false
true
false
1
playout_new(int min_length, int max_length) { playout_state_t *s; if ((s = (playout_state_t *) malloc(sizeof(playout_state_t))) == NULL) return NULL; memset(s, 0, sizeof(*s)); playout_restart(s, min_length, max_length); return s; }
false
false
false
false
false
0
heartbeat_initialize_nodelist(void *cluster, gboolean force_member, xmlNode * xml_parent) { const char *ha_node = NULL; ll_cluster_t *conn = cluster; if (conn == NULL) { crm_debug("Not connected"); return FALSE; } /* Async get client status information in the cluster */ crm_inf...
false
false
false
false
false
0
strequal(const char *a, const char *b) { return a ? b && !strcmp(a, b) : !b; }
false
false
false
false
false
0
mic_unregister_intr_callback(struct mic_device *mdev, u32 idx) { struct list_head *pos, *tmp; struct mic_intr_cb *intr_cb; unsigned long flags; int i; spin_lock(&mdev->irq_info.mic_thread_lock); spin_lock_irqsave(&mdev->irq_info.mic_intr_lock, flags); for (i = 0; i < MIC_NUM_OFFSETS; i++) { list_for_each_saf...
false
false
false
false
false
0
EmitKeyedCallWithIC(Call* expr, Expression* key, RelocInfo::Mode mode) { // Load the key. VisitForAccumulatorValue(key); // Swap the name of the function and the receiver on the stack to follow // the calling convention for...
false
false
false
false
false
0
get_params(int argc, char *argv[]) { struct parameters params; params.try_ingroup = false; params.deroot = false; int opt_char; while ((opt_char = getopt(argc, argv, "dhl")) != -1) { switch (opt_char) { case '?': // TODO what is this case for? exit (EXIT_FAILURE); case 'd': params.deroot = true; ...
false
false
true
false
true
1
_e_module_cb_idler(void *data __UNUSED__) { if (_e_modules_delayed) { const char *name; E_Module *m; name = eina_list_data_get(_e_modules_delayed); _e_modules_delayed = eina_list_remove_list(_e_modules_delayed, _e_modules_delayed); m = NULL; if (name) m...
true
true
false
false
false
1
aim_ssi_itemlist_cmp(struct aim_ssi_item *cur1, struct aim_ssi_item *cur2) { if (!cur1 || !cur2) return 1; if (cur1->data && !cur2->data) return 2; if (!cur1->data && cur2->data) return 3; if ((cur1->data && cur2->data) && (aim_tlvlist_cmp(cur1->data, cur2->data))) return 4; if (cur1->name && !cur2-...
false
false
false
false
false
0
EffectKnockBack(SpellEffectIndex eff_idx) { if (!unitTarget) return; unitTarget->KnockBackFrom(m_caster, float(m_spellInfo->EffectMiscValue[eff_idx]) / 10, float(damage) / 10); }
false
false
false
false
false
0
__perf_event_header__init_id(struct perf_event_header *header, struct perf_sample_data *data, struct perf_event *event) { u64 sample_type = event->attr.sample_type; data->type = sample_type; header->size += event->id_header_size; if (sample_type & PERF_SAMPLE_TID) { /* namespace issues */ data->ti...
false
false
false
false
false
0
get_attr_wmmxt_transfer_c3 (rtx insn ATTRIBUTE_UNUSED) { enum attr_type cached_type ATTRIBUTE_UNUSED; switch (recog_memoized (insn)) { case -1: if (GET_CODE (PATTERN (insn)) != ASM_INPUT && asm_noperands (PATTERN (insn)) < 0) fatal_insn_not_found (insn); if (((cached_type = ge...
false
false
false
false
false
0
bfa_fcport_sm_disabling_qwait(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event) { bfa_trc(fcport->bfa, event); switch (event) { case BFA_FCPORT_SM_QRESUME: bfa_sm_set_state(fcport, bfa_fcport_sm_disabling); bfa_fcport_send_disable(fcport); break; case BFA_FCPORT_SM_STOP: bfa_sm_set_state(f...
false
false
false
false
false
0
semantic(Scope *sc) { if (!type) type = Type::tfloat64; else type = type->semantic(loc, sc); return this; }
false
false
false
false
false
0
parse_comparison_regexp(struct parsing *p, struct expr *res) { int err; if (lex(p) != 0) goto err_res; if (p->token != T_STRING && p->token != T_REGEXP) { *p->error = NULL; asprintf(p->error, "Regexp expected, got `%.*s'", p->token_len, p->token_start); goto err_res; } res->v.regexp = parser_malloc(p,...
false
false
false
false
false
0
run(QMap<QString,QVariant> &tokens, PadDocument *document) { //qWarning() << "run Core"; // PadItem calls run on the Core only if core value is defined const QString &value = tokens[_uid].toString(); if (value.isEmpty()) { // Define output range LOG_ERROR_FOR("PadCore", "token run without va...
false
false
false
false
false
0
read(const std::string & file, GeometryAoS * const geometry) { std::fstream fs; fs.open(file.c_str(), std::fstream::in | std::fstream::binary); if (fs.is_open()) { readHeader(fs, geometry->info); if (geometry->info.vertexType == AoS) readContent(fs, *geometry); else if (geometry->info.vertexType == SoA) { ...
false
false
false
false
false
0
g_proxy_volume_monitor_get_mount_for_id (GProxyVolumeMonitor *volume_monitor, const char *id) { GProxyMount *mount; G_LOCK (proxy_vm); mount = g_hash_table_lookup (volume_monitor->mounts, id); if (mount != NULL) g_object_ref (mount); G_UNLOCK (proxy_vm)...
false
false
false
false
false
0
check_comb(int combptr) { int k; word w; if (combptr==0) return 0; w=syntbl[combptr]; for(combptr+=1, k=ip;syntbl[combptr]!=0;combptr++,k++) if (syntbl[combptr]!=input[k]) break; if (syntbl[combptr]==0) { ip=k-1; return w; } return 0; }
false
false
false
false
false
0
expected_value_to_br_prob () { rtx insn, cond, ev = NULL_RTX, ev_reg = NULL_RTX; for (insn = get_insns (); insn ; insn = NEXT_INSN (insn)) { switch (GET_CODE (insn)) { case NOTE: /* Look for expected value notes. */ if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EXPECTED_VALUE) { ev = NOTE...
false
false
false
false
false
0
RemoveBuildTarget(int index) { ProjectBuildTarget* target = GetBuildTarget(index); if (target) { wxString oldTargetName = target->GetTitle(); // remove target from any virtual targets it belongs to for (VirtualBuildTargetsMap::iterator it = m_VirtualTargets.begin(); it != m_VirtualT...
false
false
false
false
false
0
Swig_name_object_set(Hash *namehash, String *name, SwigType *decl, DOH *object) { DOH *n; #ifdef SWIG_DEBUG Printf(stdout, "Swig_name_object_set: '%s', '%s'\n", name, decl); #endif n = Getattr(namehash, name); if (!n) { n = NewHash(); Setattr(namehash, name, n); Delete(n); } /* Add an object b...
false
false
false
false
false
0
volume_button_cb(GtkButton *, gpointer user_data) { static gdouble volume = 0.0; gdouble vol = gtk_adjustment_get_value(gtk_range_get_adjustment(GTK_RANGE(user_data))); if (vol != 0.0) { gtk_adjustment_set_value(gtk_range_get_adjustment(GTK_RANGE(user_data)), 0.0); volume = vol; } else gtk_adjustment_set...
false
false
false
false
false
0
handle_responder(struct ib_wc *wc, struct mlx5_cqe64 *cqe, struct mlx5_ib_qp *qp) { struct mlx5_ib_dev *dev = to_mdev(qp->ibqp.device); struct mlx5_ib_srq *srq; struct mlx5_ib_wq *wq; u16 wqe_ctr; u8 g; if (qp->ibqp.srq || qp->ibqp.xrcd) { struct mlx5_core_srq *msrq = NULL; if (qp->ibqp.xrcd) { m...
false
false
false
false
false
0
pkix_pl_CRL_Equals( PKIX_PL_Object *firstObject, PKIX_PL_Object *secondObject, PKIX_Boolean *pResult, void *plContext) { PKIX_PL_CRL *firstCrl = NULL; PKIX_PL_CRL *secondCrl = NULL; SECItem *crlDerOne = NULL, *crlDerTwo = NULL; PKIX_UInt32 secondType; ...
false
false
false
false
false
0
_dereg_segment(map_segment_t *s) { int rc = OSHMEM_SUCCESS; int j; int nprocs, my_pe; nprocs = oshmem_num_procs(); my_pe = oshmem_my_proc_id(); MCA_SPML_CALL(deregister(s->mkeys)); if (s->mkeys_cache) { for (j = 0; j < nprocs; j++) { if (j == my_pe) con...
false
false
false
false
false
0
GetLinkImplementation(const char* config, cmTarget *head) { // There is no link implementation for imported targets. if(this->IsImported()) { return 0; } // Lookup any existing link implementation for this configuration. TargetConfigPair key(head, cmSystemTools::UpperCase(config? config : "")); ...
false
false
false
false
false
0
service_main(int argc, char **argv, char **envp __attribute__((unused))) { int opt, r; sync_log_init(); deliver_in = prot_new(0, 0); deliver_out = prot_new(1, 1); prot_setflushonread(deliver_in, deliver_out); prot_settimeout(deliver_in, 360); while ((opt = getopt(argc, argv, "a")) != ...
false
true
false
false
true
1
wait_fill_event(struct tb_event *event, struct timeval *timeout) { int result; char buf[32]; fd_set events; memset(event, 0, sizeof(struct tb_event)); /* try to extract event from input buffer, return on success */ event->type = TB_EVENT_KEY; if (extract_event(event, &inbuf, inputmode) == 0) return TB_EVENT_K...
false
false
false
false
true
1
LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM, LLVMBool Internalize, LLVMBool RunInliner) { PassManagerBuilder *Buil...
false
false
false
false
false
0
port_show(struct device *dev, struct device_attribute *attr, char *buf) { struct intel_th_device *thdev = to_intel_th_device(dev); if (thdev->output.port >= 0) return scnprintf(buf, PAGE_SIZE, "%u\n", thdev->output.port); return scnprintf(buf, PAGE_SIZE, "unassigned\n"); }
false
false
false
false
false
0
dht_selfheal_dir_getafix (call_frame_t *frame, loc_t *loc, dht_layout_t *layout) { dht_local_t *local = NULL; uint32_t holes = 0; int ret = -1; int i = -1; uint32_t overlaps = 0; local = frame->local; holes = l...
false
false
false
false
false
0
giggle_graph_renderer_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec) { GiggleGraphRendererPrivate *priv = GIGGLE_GRAPH_RENDERER (object)->_priv; switch (param_id) { case PROP_REVISION: g_value_set_object (value, priv->revision); break; defa...
false
false
false
false
false
0
slic_reg32_write(void __iomem *reg, u32 value, bool flush) { writel(value, reg); if (flush) mb(); }
false
false
false
false
false
0
idle_return_from_cache_cb (gpointer data) { GTask *task = data; SoupMessageQueueItem *item = g_task_get_task_data (task); GInputStream *istream; if (item->state == SOUP_MESSAGE_FINISHED) { /* The original request was cancelled using * soup_session_cancel_message () so it has been * already handled by the c...
false
false
false
false
false
0
seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode which) { if (file && off == 0 && way == std::ios_base::cur && which == std::ios_base::out) { #if ZLIB_VERNUM >= 0x1240 // gzoffset is only available in zlib 1.2.4 or later return pos_type(gzoffset(f...
false
false
false
false
false
0
gvir_config_domain_controller_new_from_tree(GVirConfigXmlDoc *doc, xmlNodePtr tree) { const char *type; GType gtype; type = gvir_config_xml_get_attribute_content(tree, "type"); if (type == NULL) return NULL; if (g_str_equal(type, "ide")) { ...
false
false
false
false
false
0
lm3533_led_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n) { struct device *dev = container_of(kobj, struct device, kobj); struct led_classdev *led_cdev = dev_get_drvdata(dev); struct lm3533_led *led = to_lm3533_led(led_cdev); umode_t mode = attr->mode; if (attr == &dev_attr_als_cha...
false
false
false
false
false
0
delete_monster(int y, int x) { /* Paranoia */ if (!in_bounds(y, x)) return; /* Delete the monster (if any) */ if (cave_m_idx[y][x] > 0) delete_monster_idx(cave_m_idx[y][x]); }
false
false
false
false
false
0
revert_stringlist(strlp) struct stringlist *strlp ; { struct stringlist *tmp, *new ; new = NULL ; /* initialize new list */ while (strlp != NULL) { /* put head of old list to * head of new list */ tmp = strlp->next ; strlp->next = new ; new = strlp ; strlp = tmp ; } return new ;...
false
false
false
false
false
0