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
nifti_swap_Nbytes( size_t n , int siz , void *ar ) /* subsuming case */ { switch( siz ){ case 2: nifti_swap_2bytes ( n , ar ) ; break ; case 4: nifti_swap_4bytes ( n , ar ) ; break ; case 8: nifti_swap_8bytes ( n , ar ) ; break ; case 16: nifti_swap_16bytes( n , ar ) ; break ; default: ...
false
false
false
false
false
0
GC_register_dynamic_libraries_dl_iterate_phdr(void) { int did_something; if (GC_register_main_static_data()) return FALSE; # ifdef PT_GNU_RELRO { static GC_bool excluded_segs = FALSE; n_load_segs = 0; if (!excluded_segs) { GC_exclude_static_roots_inner((ptr_t)load_segs, ...
false
false
false
false
false
0
__lambda46_ (BuildView* self, GtkTreePath* path) { GtkTreeModelFilter* _tmp0_ = NULL; GtkTreePath* _tmp1_ = NULL; g_return_if_fail (path != NULL); _tmp0_ = self->priv->_filtered_model; _tmp1_ = path; build_view_select_row (self, (GtkTreeModel*) _tmp0_, _tmp1_); }
false
false
false
false
false
0
view_raw(struct view *view, char **out, position_t offset, size_t bytes) { if (offset >= view->bytes) { *out = NULL; return 0; } if (offset + bytes > view->bytes) bytes = view->bytes - offset; return text_raw(view->text, out, view->start + offset, bytes); }
false
false
false
false
false
0
Java_org_eclipse_cdt_utils_spawner_Spawner_exec1(JNIEnv * env, jobject jobj, jobjectArray jcmd, jobjectArray jenv, jstring jdir) { const char *dirpath = (*env)->GetString...
false
false
false
false
false
0
efreet_mime_icon_entry_head_free(Efreet_Mime_Icon_Entry_Head *entry) { while (entry->list) { Efreet_Mime_Icon_Entry *n = (Efreet_Mime_Icon_Entry *)entry->list; entry->list = eina_inlist_remove(entry->list, entry->list); efreet_mime_icon_entry_free(n); } eina_stringshare_del(entr...
false
false
false
false
false
0
GC_add_ext_descriptor(GC_bitmap bm, word nbits) { size_t nwords = divWORDSZ(nbits + WORDSZ-1); signed_word result; size_t i; word last_part; size_t extra_bits; DCL_LOCK_STATE; LOCK(); while (GC_avail_descr + nwords >= GC_ed_size) { ext_descr * new; size_t new_size; ...
false
false
false
false
true
1
e1000_get_hw_semaphore_82574(struct e1000_hw *hw) { s32 ret_val; mutex_lock(&swflag_mutex); ret_val = e1000_get_hw_semaphore_82573(hw); if (ret_val) mutex_unlock(&swflag_mutex); return ret_val; }
false
false
false
false
false
0
gnc_date_edit_set_time_internal (GNCDateEdit *gde, time64 the_time) { char buffer [40]; struct tm *mytm = gnc_localtime (&the_time); g_return_if_fail(mytm != NULL); /* Update the date text. */ qof_print_date_dmy_buff(buffer, 40, mytm->tm_mday, ...
true
true
false
false
false
1
innconf_print_value(FILE *file, const char *key, enum innconf_quoting quoting) { size_t i; for (i = 0; i < ARRAY_SIZE(config_table); i++) if (strcmp(key, config_table[i].name) == 0) { print_parameter(file, i, quoting); return true; } return false; }
false
false
false
false
false
0
dbmw_clear(dbmw_t *dw) { if (!dbmap_clear(dw->dm)) return FALSE; dbmw_clear_cache(dw); dw->ioerr = FALSE; dw->count_needs_sync = FALSE; dw->cached = 0; return TRUE; }
false
false
false
false
false
0
add_result_free (AddResult * result) { if (result->filenames) index_free_filenames (result->filenames); if (result->tuples) index_free_tuples (result->tuples); if (result->decoders) index_free (result->decoders); g_slice_free (AddResult, result); }
false
false
false
false
false
0
blkid_strndup(const char *s, int length) { char *ret; if (!s) return NULL; if (!length) length = strlen(s); ret = malloc(length + 1); if (ret) { strncpy(ret, s, length); ret[length] = '\0'; } return ret; }
false
false
false
false
false
0
setUp(void) { out = new stringstream; formatter = new svutResultFormatterXml(*out); }
false
false
false
false
false
0
ipmi_picmg_clk_set(struct ipmi_intf * intf, int argc, char ** argv) { struct ipmi_rs * rsp; struct ipmi_rq req; unsigned char msg_data[11] = {0}; uint32_t freq = 0; memset(&req, 0, sizeof(req)); req.msg.netfn = IPMI_NETFN_PICMG; req.msg.cmd = PICMG_AMC_SET_CLK_STATE_CMD; req.msg.data = msg_data; msg_dat...
true
true
false
false
false
1
parse_accession (char *Header) { char *accession, *p; int strlength; p = &(Header[1]); /* First character is '>' */ while (*p != '\0' && *p != '\n' && *p != CONTROLM && !isspace((int) *p)) { p++; } *p = '\0'; strlength = (p - &(Header[1]))/sizeof(char); accession = (char *) CALLOC(strlength+1,size...
false
false
false
false
false
0
_e_icon_obj_prepare(Evas_Object *obj, E_Smart_Data *sd) { if (!sd->obj) return; if (sd->edje) { Evas_Object *pclip; pclip = evas_object_clip_get(sd->obj); evas_object_del(sd->obj); #ifdef USE_ICON_CACHE sd->ci = NULL; eina_stringshare_replace(&sd->file, NULL); #endif...
false
false
false
false
false
0
ilk_update_gt_irq(struct drm_i915_private *dev_priv, uint32_t interrupt_mask, uint32_t enabled_irq_mask) { assert_spin_locked(&dev_priv->irq_lock); WARN_ON(enabled_irq_mask & ~interrupt_mask); if (WARN_ON(!intel_irqs_enabled(dev_priv))) return; dev_priv->gt_irq_mask &= ~interrupt_mask; dev_p...
false
false
false
false
false
0
_find_priority_band(state_t *s, int nr) { if (s->version >= SCI_VERSION_FTU_PRIORITY_14_ZONES && (nr < 0 || nr > 14)) { if (nr == 15) return 0xffff; else { SCIkwarn(SCIkWARNING, "Attempt to get priority band %d\n", nr); } return 0; } if (s->version < SCI_VERSION_FTU_PRIORITY_14_ZONES && (nr < 0 || nr ...
false
false
false
false
false
0
pca9532_set_brightness(struct led_classdev *led_cdev, enum led_brightness value) { int err = 0; struct pca9532_led *led = ldev_to_led(led_cdev); if (value == LED_OFF) led->state = PCA9532_OFF; else if (value == LED_FULL) led->state = PCA9532_ON; else { led->state = PCA9532_PWM0; /* Thecus: hardcode one pwm...
false
false
false
false
false
0
acceptOss(MprSocket *listen) { MprSocket *sp; MprSslSocket *osp; BIO *bioSock; SSL *osslStruct; sp = listen->service->standardProvider->acceptSocket(listen); if (sp == 0) { return 0; } lock(sp); osp = sp->sslSocket; mprAssert(osp); mp...
false
false
false
false
false
0
closeAndDelete(void) { if (m_isOpen) { #ifdef _WIN32 fflush(m_handle); fclose(m_handle); #else ::fflush(m_handle); ::fclose(m_handle); #endif if (m_readOnly) m_lastResult = XRV_READONLY; else { #ifdef _WIN32 if (m_unicode) { if (_wremove(m_filename_w) != 0) m_lastResult = XRV_READON...
false
false
false
false
false
0
stv5730_icon(Driver *drvthis, int x, int y, int icon) { PrivateData *p = drvthis->private_data; switch (icon) { case ICON_BLOCK_FILLED: p->framebuf[(y * STV5730_WID) + x] = 0x77; break; case ICON_HEART_OPEN: p->framebuf[(y * STV5730_WID) + x] = 0x0B; break; case ICON_HEART_FILLED: p->fra...
false
false
false
false
false
0
_flush_list(struct sst *sst, struct skipnode *x,struct skipnode *hdr,int flush_count) { int pos = 0; int count = flush_count; struct skipnode *cur = x; struct skipnode *first = hdr; struct skiplist *merge = NULL; while(cur != first) { struct meta_node *meta_info = meta_get(sst->meta, cur->key); /* If m is ...
false
true
false
false
false
1
setState(State state) { if (state == m_state) return; if (m_state == Thinking) emit stoppedThinking(); m_state = state; }
false
false
false
false
false
0
prv_to_log_level(gint *int_list, gsize length) { gsize i; int log_level_value; int level; int log_level_array[] = { DLEYNA_LOG_LEVEL_DISABLED, DLEYNA_LOG_LEVEL_ERROR, DLEYNA_LOG_LEVEL_CRITICAL, DLEYNA_LOG_LEVEL_WARNING, DLEYNA_LOG_LEVEL_MESSAGE, DLEYNA_LOG_LEVEL_INFO, DLEYNA_LOG_LEVEL_DEBUG, DLEYNA_LOG_LEVE...
false
false
false
false
false
0
key_press( GtkTreeView *list, GdkEventKey *event, gpointer user_data ) { GtkAdjustment *adjustment = user_data; GtkTreePath *path; GtkTreeViewColumn *focus_column; gdouble base, oldbase, base_limit; gdouble page_size, step_increment; int cursor_row = 0; int num_rows; base = oldbase = gtk_adjustment_get...
false
false
false
false
false
0
del_lines(nlines, undo) long nlines; /* number of lines to delete */ int undo; /* if TRUE, prepare for undo */ { long n; if (nlines <= 0) return; /* save the deleted lines for undo */ if (undo && u_savedel(curwin->w_cursor.lnum, nlines) == FAIL) return; for (n = 0; n < nlines; ) ...
false
false
false
false
false
0
bq27xxx_battery_read_soc(struct bq27xxx_device_info *di) { int soc; soc = bq27xxx_read(di, BQ27XXX_REG_SOC, false); if (soc < 0) dev_dbg(di->dev, "error reading State-of-Charge\n"); return soc; }
false
false
false
false
false
0
update_last_dictionary() { gchar *title; gchar *book_path; gint subbook_no; gchar *appendix_path; gint appendix_subbook_no; gchar *fg, *bg; GtkTreeSelection *select; gchar *fs_book_path; gchar *fs_appendix_path; BOOK_INFO *binfo=NULL; gchar *tmp; LOG(LOG_DEBUG, "IN : update_last_dictionary()"); if(edited...
false
false
false
false
false
0
fibheap_link (heap, node, parent) fibheap_t heap ATTRIBUTE_UNUSED; fibnode_t node; fibnode_t parent; { if (parent->child == NULL) parent->child = node; else fibnode_insert_before (parent->child, node); node->parent = parent; parent->degree++; node->mark = 0; }
false
false
false
false
false
0
fix_prompt(void) { descr_line *d; if (err_ptr==NULL) return; d=read_descr(err_ptr[0].start,err_ptr[0].size); if (d==NULL) return; if (strncasecmp(d[0],"What Now?",9)==0) err_ptr[0].size=err_ptr[0].start=0; free_descr(d); }
false
false
false
false
false
0
renConvert(buf, small) jcConvBuf *buf; int small; { TRACE("renConvert", "Enter") /* $BO"J8@aJQ49$9$k(B */ if (doKanrenConvert(buf, small ? buf->curClause : buf->curLCStart) < 0) { return -1; } /* * $B%+%l%s%HJ8@a$N@_Dj(B * small $B$,(B 0 $B$J$i!"(B * $B%+%l%s%HBgJ8@a$N@hF,$O(B buf->curLC...
false
false
false
false
false
0
au_ren_rev_whsrc(int err, struct au_ren_args *a) { int rerr; a->h_path.dentry = a->src_wh_dentry; rerr = au_wh_unlink_dentry(a->src_h_dir, &a->h_path, a->src_dentry); au_set_dbwh(a->src_dentry, a->src_bwh); if (rerr) RevertFailure("unlink %pd", a->src_wh_dentry); }
false
false
false
false
false
0
key_update(key_ref_t key_ref, const void *payload, size_t plen) { struct key_preparsed_payload prep; struct key *key = key_ref_to_ptr(key_ref); int ret; key_check(key); /* the key must be writable */ ret = key_permission(key_ref, KEY_NEED_WRITE); if (ret < 0) return ret; /* attempt to update it if supporte...
false
false
false
false
false
0
InstallWindowColormaps (FvwmWindow *tmp) { int i; XWindowAttributes attributes; Window w; Bool ThisWinInstalled = False; /* If no window, then install root colormap */ if(!tmp) tmp = &Scr.FvwmRoot; colormap_win = tmp; /* Save the colormap to be loaded for when force loading of * root colormap(...
false
false
false
false
false
0
transmit_registerrej(struct skinnysession *s) { struct skinny_req *req; char name[16]; if (!(req = req_alloc(sizeof(struct register_rej_message), REGISTER_REJ_MESSAGE))) return; memcpy(&name, req->data.reg.name, sizeof(name)); snprintf(req->data.regrej.errMsg, sizeof(req->data.regrej.errMsg), "No Authority: %s...
true
true
false
false
false
1
picflag_from_initializer (tree init) { if (init == error_mark_node) return PICFLAG_ERRONEOUS; else if (!TREE_CONSTANT (init)) { if (TREE_SIDE_EFFECTS (init)) return PICFLAG_SIDE_EFFECTS; else return PICFLAG_NOT_ALL_CONSTANT; } else if (!initializer_constant_valid_p (init, TREE_TYPE (init...
false
false
false
false
false
0
restore( const KUrl &defaultPath ) { m_tracks.clear(); m_playlistToRestore = Playlists::loadPlaylistFile( defaultPath ); if ( m_playlistToRestore ) // This pointer will be 0 on first startup { subscribeTo( Playlists::PlaylistPtr::staticCast( m_playlistToRestore ) ); m_playlistToRestore->...
false
false
false
false
false
0
initialize_table_dessertSysifTable(void) { dessertSysifTable_registration *user_context; u_long flags; DEBUGMSGTL(("verbose:dessertSysifTable:initialize_table_dessertSysifTable", "called\n")); /* * TODO:301:o: Perform dessertSysifTable one-time table initialization. */ /* ...
false
false
false
false
false
0
evergreen_is_safe_reg(struct radeon_cs_parser *p, u32 reg) { struct evergreen_cs_track *track = p->track; u32 m, i; i = (reg >> 7); if (unlikely(i >= REG_SAFE_BM_SIZE)) { return false; } m = 1 << ((reg >> 2) & 31); if (!(track->reg_safe_bm[i] & m)) return true; return false; }
false
false
false
false
false
0
_moveBackToFirstNonBlankData(fp_Run *pCurrentRun, fp_Run **pOffendingRun) { // need to move back untill we find the first non blank character and // return the distance back to this character. UT_sint32 iTrailingBlank = 0; do { if(!pCurrentRun->doesContainNonBlankData()) { iTrailingBlank += pCurrentRun->g...
false
false
false
true
false
1
ena_free_all_tx_bufs(struct ena_adapter *adapter) { struct ena_ring *tx_ring; int i; for (i = 0; i < adapter->num_queues; i++) { tx_ring = &adapter->tx_ring[i]; ena_free_tx_bufs(tx_ring); } }
false
false
false
false
false
0
_gnutls_mpi_dprint_lz (const bigint_t a, gnutls_datum_t * dest) { int ret; opaque *buf = NULL; size_t bytes = 0; if (dest == NULL || a == NULL) return GNUTLS_E_INVALID_REQUEST; _gnutls_mpi_print_lz (a, NULL, &bytes); if (bytes != 0) buf = gnutls_malloc (bytes); if (buf == NULL) return GNUTL...
false
false
false
false
false
0
initLiterals() { literals["cyi"] = 64; literals["csi"] = 66; literals["cmi"] = 65; literals["tl"] = 33; literals["tr"] = 34; literals["cdi"] = 63; literals["cmoi"] = 62; literals["csf"] = 67; }
false
false
false
false
false
0
buffer_getbuffer(PyBufferObject *self, Py_buffer *buf, int flags) { void *ptr; Py_ssize_t size; if (!get_buf(self, &ptr, &size, ANY_BUFFER)) return -1; return PyBuffer_FillInfo(buf, (PyObject*)self, ptr, size, self->b_readonly, flags); }
false
false
false
false
false
0
window_find_level(void *server, int level) { GSList *tmp; WINDOW_REC *match; match = NULL; for (tmp = windows; tmp != NULL; tmp = tmp->next) { WINDOW_REC *rec = tmp->data; if (WINDOW_LEVEL_MATCH(rec, server, level)) { /* prefer windows without any items */ if (rec->items == NULL) return rec; if ...
false
false
false
false
false
0
kill_all_assoc() { assoc_t *a, *x; for (a = assoc; a; a = x) { x = a->next; nfree(a); } assoc = NULL; }
false
false
false
false
false
0
bx_write_ne2k_options(FILE *fp, bx_list_c *base) { fprintf(fp, "ne2k: enabled=%d", SIM->get_param_bool("enabled", base)->get()); if (SIM->get_param_bool("enabled", base)->get()) { char *ptr = SIM->get_param_string("macaddr", base)->getptr(); fprintf(fp, ", ioaddr=0x%x, irq=%d, mac=%02x:%02x:%02x:%02x:%02x:%...
false
false
false
false
false
0
MultiThreadedConnector ( const MultiThreadedConnector & connector ) throw ( Exception ) : Connector( connector) { reconnect = connector.reconnect; mutexProduce = connector.mutexProduce; condPro...
false
false
false
false
false
0
doConfigureInternal() { this->Output->clear(); this->CacheValues->selectionModel()->clear(); QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), "setProperties", Qt::QueuedConnection, Q_ARG(QCMakePropertyList, this->CacheValues->cacheModel()->properties())); QMetaObject::invokeMethod(th...
false
false
false
false
false
0
debrief_pause() { if (Debriefing_paused) return; Debriefing_paused = 1; if (Briefing_music_handle >= 0) { audiostream_pause(Briefing_music_handle); } if ((Stage_voice < 0) || (Stage_voice > Num_debrief_stages) || (Debrief_voices[Stage_voice] < 0)) return; audiostream_pause(Debrief_voices[Stage_voice]); ...
false
false
false
false
false
0
drm_gem_cma_dumb_map_offset(struct drm_file *file_priv, struct drm_device *drm, u32 handle, u64 *offset) { struct drm_gem_object *gem_obj; gem_obj = drm_gem_object_lookup(drm, file_priv, handle); if (!gem_obj) { dev_err(drm->dev, "failed to lookup GEM object\n"); return -EINVAL; } *offset = drm_vma_n...
false
false
false
false
false
0
unshapeLamAlef(const uint8_t *inputBytes, int32_t inputBytesLength, int32_t &length) { int32_t bigBufferLength = inputBytesLength * 2; uint8_t *bigBuffer = (uint8_t *)uprv_malloc(bigBufferLength); uint8_t *resultBuffer = NULL; if (bigBuffer != NULL) { int32_t bufferIndex; uint8_t un...
false
false
false
false
false
0
print_file_name(int level, const char *path) { STATIC_STRBUF(sb); char *target = (Fflag) ? "mains" : "_top"; int size = filesize(path); char tips[80]; message(" [%d] adding %s", ++src_count, removedotslash(path)); /* * We assume the file which has one of the following suffixes * as a candidate of include fil...
false
false
false
false
false
0
decode_op_map(struct xdr_stream *xdr, struct nfs4_op_map *op_map) { __be32 *p; uint32_t bitmap_words; unsigned int i; p = xdr_inline_decode(xdr, 4); bitmap_words = be32_to_cpup(p++); if (bitmap_words > NFS4_OP_MAP_NUM_WORDS) return -EIO; p = xdr_inline_decode(xdr, 4 * bitmap_words); for (i = 0; i < bitmap_wo...
false
false
false
false
false
0
hash_init(jbig2dec_params_t *params) { params->hash_ctx = (SHA1_CTX*)malloc(sizeof(SHA1_CTX)); if (params->hash_ctx == NULL) { fprintf(stderr, "unable to allocate hash state\n"); params->hash = 0; return; } else { SHA1_Init(params->hash_ctx); } }
false
false
false
false
false
0
process_local_file_hdr(__G) /* return PK-type error code */ __GDEF { local_byte_hdr byterec; /*--------------------------------------------------------------------------- Read the next local file header and do any necessary machine-type con- versions (byte ordering, structure padding compensation--...
false
false
false
false
false
0
ds1685_rtc_irq_handler(int irq, void *dev_id) { struct platform_device *pdev = dev_id; struct ds1685_priv *rtc = platform_get_drvdata(pdev); u8 ctrlb, ctrlc; unsigned long events = 0; u8 num_irqs = 0; /* Abort early if the device isn't ready yet (i.e., DEBUG_SHIRQ). */ if (unlikely(!rtc)) return IRQ_HANDLED; ...
false
false
false
false
false
0
Delete_supp_cmd_struct(struct supp_cmd_struct *supp_cmd) { if (!supp_cmd) return; if(supp_cmd->first_cmd){ Delete_cmd_struct(supp_cmd->first_cmd); supp_cmd->first_cmd = NULL; supp_cmd->cmd = NULL; } free(supp_cmd); }
false
false
false
false
false
0
register_class_slice (ACSliceInfo *acsi, #ifdef ACMODEL ACM_Name *parent) { #else JPL_Name *parent) { #endif CClassInfo *ci = acsi->object ()->ClassInfo (); // find the parent model element if (!parent && !(parent = register_scope (ci))) return 0; #ifdef ACMODEL string name = ci->Name().c_str(); TU...
false
false
false
false
false
0
ved_deliver_byterange(const struct sess *sp, ssize_t low, ssize_t high) { struct storage *st; ssize_t l, lx; u_char *p; //printf("BR %jd %jd\n", low, high); lx = 0; VTAILQ_FOREACH(st, &sp->wrk->obj->store, list) { p = st->ptr; l = st->len; //printf("[0-] %jd %jd\n", lx, lx + l); if (lx + l < low) { lx +=...
false
false
false
false
false
0
brasero_multi_DND_drag_data_get (EggTreeMultiDragSource *drag_source, GList *path_list, GtkSelectionData *selection_data) { GtkSelectionData *selection_tmp; GList *uris_list = NULL; gchar **uris; GList *iter; gint i; if (gtk_selection_data_get_target (selection_data) != gdk_atom_intern ("text/uri-lis...
false
false
false
false
false
0
InternalIsLeadByte(char ch) { if (SC_CP_UTF8 == codePage) // For lexing, all characters >= 0x80 are treated the // same so none is considered a lead byte. return false; else return Platform::IsDBCSLeadByte(codePage, ch); }
false
false
false
false
false
0
ColOf(char *buffer, int length, int margin) { int n; int result; for (n = 0, result = margin + 1; n < length; ++n) { int ch = UChar(buffer[n]); switch (ch) { case '\n': /* actually newline should clear the remainder of the line * and move to the next line - but that seems a little awkward ...
false
false
false
false
false
0
spfi_wait_all_done(struct img_spfi *spfi) { unsigned long timeout = jiffies + msecs_to_jiffies(50); while (time_before(jiffies, timeout)) { u32 status = spfi_readl(spfi, SPFI_INTERRUPT_STATUS); if (status & SPFI_INTERRUPT_ALLDONETRIG) { spfi_writel(spfi, SPFI_INTERRUPT_ALLDONETRIG, SPFI_INTERRUPT_CLE...
false
false
false
false
false
0
EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) { if (GetStatus() != STATUS_IN_PROGRESS) return; DEBUG_LOG("BattleGroundAV: using gameobject %i", target_obj->GetEntry()); uint8 event = (sBattleGroundMgr.GetGameObjectEventIndex(target_obj->GetGUIDLow())).event1; if (event >= BG_A...
false
false
false
false
false
0
luaL_newmetatable (lua_State *L, const char *tname) { lua_getfield(L, LUA_REGISTRYINDEX, tname); /* get registry.name */ if (!lua_isnil(L, -1)) /* name already in use? */ return 0; /* leave previous value on top, but return 0 */ lua_pop(L, 1); lua_newtable(L); /* create metatable */ lua_pushvalue(L, -...
false
false
false
false
false
0
PrintFrameHelp(char *sName) { for(int ii = 0; ii < frameTableCount - 1; ii++ ) { std::cout << " --" << frameTable[ii].frameName << " " << frameTable[ii].frameLongName << std::endl; } return; }
false
false
false
false
false
0
update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib, struct recv_stat *prxstat) { u16 drvinfo_sz; drvinfo_sz = (le32_to_cpu(prxstat->rxdw0) & 0x000f0000) >> 16; drvinfo_sz <<= 3; /*TODO: * Offset 0 */ pattrib->bdecrypted = ((le32_to_cpu(prxstat->rxdw0) & BIT(27)) >> 27) ? 0 : 1; pa...
false
false
false
false
false
0
crm_log_filter(struct qb_log_callsite *cs) { int lpc = 0; static int need_init = 1; static const char *trace_fns = NULL; static const char *trace_tags = NULL; static const char *trace_fmts = NULL; static const char *trace_files = NULL; static const char *trace_blackbox = NULL; if (need_...
true
true
false
false
true
1
parInqID(int tableID, int code) { int item, npars; npars = parTable[tableID].npars; for ( item = 0; item < npars; item++ ) { if ( parTable[tableID].pars[item].id == code ) break; } if ( item == npars ) item = -1; return (item); }
false
false
false
false
false
0
thread_close(int fd) { if (fd == -1) { for (fd = 0; fd < nthreads; ++fd) thread_close(fd); return; } assert(fd < nthreads); if (threads[fd] == NULL) return; mailbox_close(&threads[fd]->mbox); pthread_join(threads[fd]->thread_id, NULL); thread_log(0, 0, "thread %p stopped", (void *)threads[fd]->t...
false
false
false
false
false
0
edf_findInHeader ( const char* header, const char* key ) { char *value_ptr = strstr( header, key ); if (!value_ptr) return NULL; /* an edf line is "key = value ;" */ value_ptr = 1 + strchr( value_ptr + strlen(key), '=' ); while (isspace(*value_ptr)) value_ptr++; return value_ptr; }
false
false
false
false
false
0
motion_kill_typesetter (GuMotion* m) { if (*m->typesetter_pid) { gchar* command = NULL; /* Kill children spawned by typesetter command/script, don't know * how to do this programatically yet(glib doesn't not provides any * function for killing a process), so use pkill for now. For ...
false
false
false
false
false
0
paint(Graphics &g, const YRect &/*r*/) { unsigned int x = 0; int len, i; len = fCurrentState ? strlen(fCurrentState) : 0; //clean background of current size first, so that //it is possible to use transparent apm-background #ifdef CONFIG_GRADIENTS ref<YImage> gradient(parent()->getGradient()); ...
false
false
false
true
false
1
ib_ucm_attr_id(struct ib_ucm_file *file, const char __user *inbuf, int in_len, int out_len) { struct ib_ucm_attr_id_resp resp; struct ib_ucm_attr_id cmd; struct ib_ucm_context *ctx; int result = 0; if (out_len < sizeof(resp)) return -ENOSPC; if (copy_from_user(&cmd, inbuf, sizeof(cmd))) re...
false
false
false
false
false
0
Read16BitImage (FILE *fp, unsigned short *pixels, int xsize, int ysize, int skip, int swapBytes) { unsigned short *shortPtr; int numShorts = xsize * ysize; if (skip) { fseek (fp, skip, 0); } shortPtr = pixels; shortPtr += xsize*(ysize - 1); for (int j=0...
false
false
false
false
false
0
bgav_xing_header_read(bgav_xing_header_t * xing, unsigned char *buf) { int i; bgav_mpa_header_t h; memset(xing, 0, sizeof(*xing)); memset(&h, 0, sizeof(h)); if(!bgav_mpa_header_decode(&h, buf)) return 0; buf += 4 + (h.has_crc * 2) + h.side_info_size; if (strncmp((char*)buf, "Xing", 4))...
false
false
false
false
false
0
getCursor() { #ifdef sgmain if ( actplayer >= 0 ) { if ( !player[actplayer].cursorPos.valid() || player[actplayer].cursorPos.x >= xsize || player[actplayer].cursorPos.y >= ysize) player[actplayer].cursorPos = findFirstContainer(); return player[actplayer].cursorPos; } else re...
false
false
false
false
false
0
dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, struct dlm_lock *lock) { struct dlm_lockstatus *lksb = lock->lksb; BUG_ON(!lksb); /* only updates if this node masters the lockres */ spin_lock(&res->spinlock); if (res->owner == dlm->node_num) { /* check the lksb flags for the direction ...
false
true
false
false
false
1
H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size) { H5P_genplist_t *plist; /* Property list pointer */ H5Z_data_xform_t *data_xform_prop = NULL; /* New data xform property */ size_t len; char* pexp; ssize_t ret_value; /* return value */ FUNC_ENTER_API(H5Pge...
false
false
false
false
false
0
snd_ctl_elem_unlock(struct snd_ctl_file *file, struct snd_ctl_elem_id __user *_id) { struct snd_card *card = file->card; struct snd_ctl_elem_id id; struct snd_kcontrol *kctl; struct snd_kcontrol_volatile *vd; int result; if (copy_from_user(&id, _id, sizeof(id))) return -EFAULT; down_write(&card->co...
false
false
false
false
false
0
imx_uart_dma_exit(struct imx_port *sport) { if (sport->dma_chan_rx) { dma_release_channel(sport->dma_chan_rx); sport->dma_chan_rx = NULL; kfree(sport->rx_buf); sport->rx_buf = NULL; } if (sport->dma_chan_tx) { dma_release_channel(sport->dma_chan_tx); sport->dma_chan_tx = NULL; } sport->dma_is_inited...
false
false
false
false
false
0
parse_function_at_line(ScintillaObject *sci, gint tag_line) { gint start, end, max_pos; gchar *cur_tag; gint fn_style; switch (sci_get_lexer(sci)) { case SCLEX_RUBY: fn_style = SCE_RB_DEFNAME; break; case SCLEX_PYTHON: fn_style = SCE_P_DEFNAME; break; default: fn_style = SCE_C_IDENTIFIER; /* several lexers ...
false
false
false
false
false
0
mark_dragon(int pos, signed char mx[BOARDMAX], signed char mark) { int w; for (w = first_worm_in_dragon(dragon[pos].origin); w != NO_MOVE; w = next_worm_in_dragon(w)) mark_string(w, mx, mark); }
false
false
false
false
false
0
meanresp_char(double *sta,unsigned char *stimuli, unsigned long Nn,unsigned long fsize,int locator[],unsigned long Nspikes, unsigned long Ntrials) { unsigned long i,k; double temp; for(i=1;i<=Nn;i++) sta[i]=0; double rbar; rbar=(double)Nspikes/(double)Ntrials; for(k=1;k<=Ntrials;k++){ temp= ((double)...
false
false
false
false
false
0
mono_thread_internal_stop (MonoInternalThread *thread) { LOCK_THREAD (thread); if ((thread->state & ThreadState_StopRequested) != 0 || (thread->state & ThreadState_Stopped) != 0) { UNLOCK_THREAD (thread); return; } /* Make sure the thread is awake */ mono_thread_resume (thread); thread->state |= Thread...
false
false
false
false
false
0
process() { // potential decay potential = potential * potentialDecay; // make every connection do it's influence on the neuron's total potential unsigned int ssize = Synapses.size(); for ( unsigned int i=0; i < ssize; i++ ) { // lower synaptic weights if (isPlastic) Synapses[i].weight = Synapses[i].weigh...
false
false
false
false
false
0
cmd_country (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { char *code = word[2]; if (*code) { /* search? */ if (strcmp (code, "-s") == 0) { country_search (word[3], sess, (void *)PrintTextf); return TRUE; } /* search, but forgot the -s */ if (strchr (code, '*')) { countr...
false
true
true
false
false
1
index_query(IndexOptions *options, int argc, char *argv[]) { IndexReader *reader; SGREPDATA(options); reader=new_index_reader(sgrep,sgrep->index_file); if (reader==NULL) { sgrep_error(sgrep,"No index to query. Bailing out\n"); goto error; } switch (options->index_mode) { case IM_TERMS: {...
false
false
false
false
false
0
DeleteItemList(struct Item *item) /* delete starting from item */ { if (item != NULL) { DeleteItemList(item->next); item->next = NULL; if (item->name != NULL) { Debug("Unappending %s\n",item->name); free (item->name); } if (item->classes != NULL) { f...
false
false
false
false
false
0
SetProfiler(Profiler* profiler) { ASSERT(profiler_ == NULL); profiler_ = profiler; IncreaseProfilingDepth(); if (!FLAG_prof_lazy && !IsActive()) Start(); }
false
false
false
false
false
0
openG(char *name, Agdesc_t desc) { Agraph_t *g; #ifdef WIN32 gprDisc.mem = &AgMemDisc; gprDisc.id = &AgIdDisc; #endif g = agopen(name, desc, &gprDisc); if (g) agbindrec(g, UDATA, sizeof(gdata), 0); return g; }
false
false
false
false
false
0
paintBar( const MapRenderer::FieldRenderInfo& fieldInfo, const SPoint& pos, int row, int amount, int color ) { /* int length = amount / 10; int maxlength = 255/10; if ( amount ) paintFilledRectangle<4>( fieldInfo.surface, SPoint( pos.x + 10, pos.y + 2 + row*12), length, ...
false
false
false
false
false
0
probe_jbd(blkid_probe pr, const struct blkid_idmag *mag __attribute__((__unused__))) { struct ext2_super_block *es; uint32_t fi; es = ext_get_super(pr, NULL, &fi, NULL); if (!es) return errno ? -errno : 1; if (!(fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) return 1; ext_get_info(pr, 2, es); blkid_probe_set_u...
false
false
false
false
false
0
nxt_psp_get_joystick(nxt_t *nxt,int port,int joy,struct nxt_psp_joystick *jbuf) { char buf[4]; int j1,nj,i; if (joy==NXT_PSP_JOY_LEFT|NXT_PSP_JOY_RIGHT) { j1 = 0; nj = 2; } else if (joy==NXT_PSP_JOY_LEFT) { j1 = 0; nj = 1; } else if (joy==NXT_PSP_JOY_RIGHT) { j1 = 1; nj = 1; } ...
true
true
false
false
false
1
init() { int count = 0; for (int i = 0; i < modify->ncompute; i++) if (strcmp(modify->compute[i]->style,"erotate/sphere/atom") == 0) count++; if (count > 1 && comm->me == 0) error->warning(FLERR,"More than one compute erotate/sphere/atom"); pfactor = 0.5 * force->mvv2e * INERTIA; }
false
false
false
false
false
0
cli_bcapi_entropy_buffer(struct cli_bc_ctx *ctx , uint8_t* s, int32_t len) { uint32_t probTable[256]; unsigned int i; double entropy = 0; double log2 = log(2); UNUSEDPARAM(ctx); if (!s || len <= 0) return -1; memset(probTable, 0, sizeof(probTable)); for (i=0;i<(unsigned int)len...
false
false
false
false
false
0
foo_scroll_area_unmap (GtkWidget *widget) { FooScrollArea *area = FOO_SCROLL_AREA (widget); if (area->priv->input_window) gdk_window_hide (area->priv->input_window); GTK_WIDGET_CLASS (parent_class)->unmap (widget); }
false
false
false
false
false
0