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
BuildFilename( const char *pszModuleName, const char *pszExtension ) { char *pszFilename; char szLCExtension[3]; /* -------------------------------------------------------------------- */ /* Force the record type to lower case if the filename appears ...
false
false
false
false
false
0
createMesh(Mesh3DgUID muid) { //first check if there is already a mesh with this uid MeshMap3Dg::iterator i = this->meshes.find(muid); //if there is if(i != this->meshes.end()) { mError = ERR3DG_INVALIDARG; return 0; } Mesh3Dg *mesh = new Mesh3Dg(muid); if(mesh == 0) { mError = ERR3DG_OUTOFMEMORY; retur...
false
false
false
false
false
0
rfc822text(FILE *fp, struct fetchinfo *fi, struct imapscaninfo *info, unsigned long msgnum, struct rfc2045 *rfcp) { off_t start_pos, end_pos, start_body; off_t nlines, nbodylines; unsigned long i; int c; char buf[BUFSIZ]; unsigned long l; writes("RFC822.TEXT {"); rfc2045_mimepos(rfcp, &start_pos, &end_pos, &start...
true
true
false
false
true
1
del_from_uid_hash_table(char *uid, aClient *cptr) { Reg aClient *tmp, *prev = NULL; Reg u_int hashv; hashv = cptr->user->hashv; hashv %= _UIDSIZE; for (tmp = (aClient *)uidTable[hashv].list; tmp; tmp = tmp->user->uhnext) { if (tmp == cptr) { if (prev) prev->user->uhnext = tmp->user->uhne...
false
false
false
false
false
0
map_log_auto_bound (GogAxis *axis, double minimum, double maximum, double *bound) { double step; if (maximum <= 0.0) maximum = 1.0; if (minimum <= 0.0) minimum = maximum / 100.0; if (maximum < minimum) maximum = minimum * 100.0; maximum = go_fake_ceil (log10 (maximum)); minimum = go_fake_floor (log10 (min...
false
false
false
false
false
0
_get_cluster_usage(pgsql_conn_t *pg_conn, uid_t uid, slurmdb_cluster_rec_t *cluster_rec, time_t start, time_t end) { DEF_VARS; int rc = SLURM_SUCCESS; char *usage_table = cluster_day_table; char *gu_fields = "alloc_cpu_secs,down_cpu_secs,pdown_cpu_secs," "idle_cpu_secs,resv_cpu_secs,over_cpu_s...
false
false
false
false
true
1
IsSABME(u_char *data, struct PStack *st) { u_char d = data[0] & ~0x10; return (test_bit(FLG_MOD128, &st->l2.flag) ? d == SABME : d == SABM); }
false
false
false
false
false
0
sh_eth_chip_reset_giga(struct net_device *ndev) { int i; u32 mahr[2], malr[2]; /* save MAHR and MALR */ for (i = 0; i < 2; i++) { malr[i] = ioread32((void *)GIGA_MALR(i)); mahr[i] = ioread32((void *)GIGA_MAHR(i)); } /* reset device */ iowrite32(ARSTR_ARSTR, (void *)(SH_GIGA_ETH_BASE + 0x1800)); mdelay(1);...
false
false
false
false
false
0
gageQuerySet(gageContext *ctx, gagePerVolume *pvl, gageQuery query) { static const char me[]="gageQuerySet"; gageQuery lastQuery; int pi, ii; AIR_UNUSED(ctx); if (!( pvl )) { biffAddf(GAGE, "%s: got NULL pointer", me); return 1; } GAGE_QUERY_COPY(pvl->query, query); if (pvl->verbose) { fpri...
false
false
false
false
false
0
stripe_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req) { stripe_local_t *local = NULL; xlator_list_t *trav = NULL; stripe_private_t *priv = NULL; int32_t op_errno = EINVAL; int64_t filesize = 0; ...
false
false
false
false
false
0
kernfs_common_ancestor(struct kernfs_node *a, struct kernfs_node *b) { size_t da, db; struct kernfs_root *ra = kernfs_root(a), *rb = kernfs_root(b); if (ra != rb) return NULL; da = kernfs_depth(ra->kn, a); db = kernfs_depth(rb->kn, b); while (da > db) { a = a->parent; da--; } while (db > da) { ...
false
false
false
false
false
0
skipToXml() { iDeflated = false; String s1 = readLine(); String s2 = readLine(); if (s1.substr(0, 11) != "%!PS-Adobe-" || s2.substr(0, 11) != "%%Creator: ") return false; if (s2.substr(11, 6) == "Ipelib") { // the 'modern' file format of Ipe 6.0 preview 17 and later do { s1 = readLi...
false
false
false
false
false
0
restore_rom (uae_u8 *src) { uae_u32 crc32, mem_start, mem_size, mem_type, version; TCHAR *s, *romn; int i, crcdet; struct romlist *rl = romlist_getit (); mem_start = restore_u32 (); mem_size = restore_u32 (); mem_type = restore_u32 (); version = restore_u32 (); crc32 = restore_u32 (); romn = restore_string (...
false
false
false
false
false
0
netsnmp_get_timed_stash_cache_handler(int timeout, oid *rootoid, size_t rootoid_len) { netsnmp_mib_handler *handler = netsnmp_get_timed_bare_stash_cache_handler(timeout, rootoid, rootoid_len); if (handler && handler->next) { handler->next->next = netsnmp_get_stash_to_next_handler(); } re...
false
false
false
false
false
0
recursive_register(bool includes_virtual_base) const { void_cast_detail::set_type & s = void_cast_detail::void_caster_registry::get_mutable_instance(); #ifdef BOOST_SERIALIZATION_LOG std::clog << "recursive_register\n"; std::clog << m_derived->get_debug_info(); std::clog << "<-"; std::c...
false
false
false
false
false
0
fzbuf_print_text_word(fz_context *ctx, fz_buffer *fzbuf, float x, float y, char *text, int count) { int i; fz_buffer_printf(ctx, fzbuf, fmt_Td, x, y); fz_buffer_printf(ctx, fzbuf, "("); for (i = 0; i < count; i++) fz_buffer_printf(ctx, fzbuf, "%c", text[i]); fz_buffer_printf(ctx, fzbuf, ") Tj\n"); }
false
false
false
false
false
0
MoveFilterWidget(movefilter * pmf, int *UNUSED(pfOK), GCallback pfChanged, gpointer userdata) { GtkWidget *pwFrame; movefilterwidget *pmfw; GtkWidget *pw; GtkWidget *pwButton; int i; pwFrame = gtk_frame_new(_("Move filter")); pmfw = (movefilterwidget *) g_malloc(sizeof(movefilterwidget)); ...
false
false
false
false
false
0
store_in_sa_collection(void *data, GthSA *sa, GT_UNUSED const char *outputfilename, GT_UNUSED GtError *err) { SACollectionData *sa_collection_data = (SACollectionData*) data; bool inserted; inserted = gth_sa_collection_insert_sa(sa_collection_dat...
false
false
false
false
false
0
urf_client_device_changed (UrfClient *client, const char *object_path) { UrfDevice *device; device = urf_client_find_device (client, object_path); if (device == NULL) { g_warning ("no device to be changed: %s", object_path); return; } g_signal_emit (client, signals [URF_CLIENT_DEVICE_CHANGED], 0, dev...
false
false
false
false
false
0
lineout(Biobuf *b, Line *l) { int n, m; n = l->llen; m = Bwrite(b, l->line, n); if(n != m) exits("write"); }
false
false
false
false
false
0
response_cb (GtkWidget *dialog, int response_id, DialogData *data) { if (response_id == GTK_RESPONSE_OK) { char *password; gboolean encrypt_header; password = _gtk_entry_get_locale_text (GTK_ENTRY (GET_WIDGET ("password_entry"))); encrypt_header = gtk_toggle_button_get_active (GTK_...
false
false
false
false
false
0
cclass(c) register unsigned char c; { if (c == '\t' && !list) return 2; if (c == '' || c < ' ') return 1; #if !OS_DOS if (c & 0x80) return 3; #endif return 0; }
false
false
false
false
false
0
fill_datetime(char* datestr, char* timestr) { struct icaltimetype stm; memset(&stm,0,sizeof(stm)); if (datestr != 0){ sscanf(datestr,"%4d%2d%2d",&(stm.year), &(stm.month), &(stm.day)); } if (timestr != 0){ sscanf(timestr,"%2d%2d%2d", &(stm.hour), &(stm.minute), &(stm....
false
false
false
false
false
0
induceSA(const void *T, sais_index_type *SA, sais_index_type *C, sais_index_type *B, sais_index_type n, sais_index_type k, int cs) { sais_index_type *b, i, j; sais_index_type c0, c1; /* compute SAl */ if(C == B) { getCounts(T, C, n, k, cs); } getBuckets(C, B, k, 0); /* find starts of buckets...
false
false
false
false
false
0
_item_multi_select_down(Elm_Gengrid_Smart_Data *sd) { unsigned int i; Eina_Bool r = EINA_TRUE; if (!sd->selected) return EINA_FALSE; for (i = 0; (r) && (i < sd->nmax); i++) r &= _item_multi_select_right(sd); return r; }
false
false
false
false
false
0
updateGui() { updateTitle(); if( !m_search->hasFocus() ) setButtonFocus( KDialog::Ok ); update(); }
false
false
false
false
false
0
ogg_stream_init(ogg_stream_state *os, int serialno) { if (os) { memset(os, 0, sizeof(ogg_stream_state)); os->body_storage=16*1024; os->body_data=_ogg_malloc(os->body_storage*sizeof(char)); os->lacing_storage=1024; os->lacing_vals=_ogg_malloc(os->lacing_storage*sizeof(int)); os->granule_vals=_...
false
false
false
false
false
0
work_queue_pop(work_queue_t *work_q) { work_item_t *work_item; void *data; if (!work_q || !work_q->head) { return NULL; } work_item = work_q->head; data = work_item->data; work_q->head = work_item->next; if (work_q->head == NULL) { work_q->tail = NULL; } free(work_item); work_q->item_count--; return da...
false
false
false
false
false
0
r1373f4_init(struct gk104_ramfuc *fuc) { struct gk104_ram *ram = container_of(fuc, typeof(*ram), fuc); const u32 mcoef = ((--ram->P2 << 28) | (ram->N2 << 8) | ram->M2); const u32 rcoef = (( ram->P1 << 16) | (ram->N1 << 8) | ram->M1); const u32 runk0 = ram->fN1 << 16; const u32 runk1 = ram->fN1; if (ram->from ==...
false
false
false
false
false
0
d_type_from_stat (struct iatt *buf) { unsigned char d_type; if (IA_ISLNK (buf->ia_type)) { d_type = DT_LNK; } else if (IA_ISDIR (buf->ia_type)) { d_type = DT_DIR; } else if (IA_ISFIFO (buf->ia_type)) { d_type = DT_FIFO; } else i...
false
false
false
false
false
0
update_view() { std::vector< NEXT_ITEM > next_items; update_by_tfidf( next_items ); std::vector< DBTREE::ArticleBase* >list_article; std::vector< NEXT_ITEM >::iterator it_next_items = next_items.begin(); for( ; it_next_items != next_items.end(); ++it_next_items ) list_article.push_back( ( *it_next...
false
false
false
false
false
0
removeGoal(GoalPtr goal) { nix::removeGoal(goal, derivationGoals); nix::removeGoal(goal, substitutionGoals); if (topGoals.find(goal) != topGoals.end()) { topGoals.erase(goal); /* If a top-level goal failed, then kill all other goals (unless keepGoing was set). */ if (goal-...
false
false
false
false
false
0
GetOptFromFile(char* filename){ FILE* OptFile; int size=0; char* buffer=NULL; int readed=0; if (!filename)return NULL; OptFile=fopen(filename,"r"); if(!OptFile){ fprintf(stderr,"Erorr opening template file %s, default will be used.\n",filename); return NULL; } fseek(OptFile,0,SEEK_END); size=f...
false
false
false
false
false
0
kexec_purgatory_get_symbol_addr(struct kimage *image, const char *name) { struct purgatory_info *pi = &image->purgatory_info; Elf_Sym *sym; Elf_Shdr *sechdr; sym = kexec_purgatory_find_symbol(pi, name); if (!sym) return ERR_PTR(-EINVAL); sechdr = &pi->sechdrs[sym->st_shndx]; /* * Returns the address where...
false
false
false
false
false
0
remove_stars_of_type_window(GtkWidget *window, int type_mask, int flag_mask) { struct gui_star_list *gsl; gsl = gtk_object_get_data(GTK_OBJECT(window), "gui_star_list"); if (gsl == NULL) return; remove_stars_of_type(gsl, type_mask, flag_mask); }
false
false
false
false
false
0
c4_remove(struct pci_dev *pdev) { avmcard *card = pci_get_drvdata(pdev); avmctrl_info *cinfo; u_int i; if (!card) return; c4_reset(card); for (i = 0; i < card->nr_controllers; i++) { cinfo = &card->ctrlinfo[i]; detach_capi_ctr(&cinfo->capi_ctrl); } free_irq(card->irq, card); iounmap(card->mbase); re...
false
false
false
false
false
0
unloadFactoryAliases() { WindowFactoryManager& wfmgr = WindowFactoryManager::getSingleton(); std::vector<AliasMapping>::iterator alias = d_aliasMappings.begin(); // remove all factory aliases for (;alias != d_aliasMappings.end(); ++alias) { // get iterator WindowFactoryManager::Type...
false
false
false
false
false
0
solve(fs) /* Solve eqns for lambda-lifting */ List fs; { /* of local function definitions */ Bool hasChanged; List fs0, fs1; /* initial pass distinguishes between those functions defined in fs and * those defined in enclosing LETREC clauses ... */ for (fs0=fs; nonNull(fs0); fs0=tl(fs...
false
false
false
false
false
0
maker_minolta1_tagname(unsigned short tag,int model) { char *tagname = CNULL; /* The Minolta MakerNote of TIFF format images have a JPEG */ /* thumbnail with a defective SOI marker (0x00f8). In fact, */ /* Minolta JPEG_SOI is often missing the high "0xff". */ if(tagname ==...
false
false
false
false
false
0
ParseSGGDate(const char *sz, unsigned int *pnDay, unsigned int *pnMonth, unsigned int *pnYear) { static const char *aszMonths[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; int i; char szMonth[80]; uns...
false
false
false
false
false
0
Button_Layer_menu(void) { byte transparent_color = Main_backups->Pages->Transparent_color; byte transparent_background = Main_backups->Pages->Background_transparent; short clicked_button; byte color; byte click; Open_window(122,100,"Layers"); Window_display_frame_in( 6, 21,110, 52); Print_i...
false
false
false
false
false
0
makeSDS(int32 sd_id, char* name, int32 dtype, int32 rank, int32* dimsizes, int32* start, int32* strides, int32* count, void* data) { int32 sds_id; intn status; intn num_errs = 0; /* number of errors so far */ /* Create the named dataset */ sds_id = SDcreate(sd_id, name, dtype...
false
false
false
false
false
0
do_filter(int *x, int *y, int n) { int i, j; for (i = 0, j = 1; j < n; j++) { if (x[j] == x[i] && y[j] == y[i]) continue; i++; if (i == j) continue; x[i] = x[j]; y[i] = y[j]; } return i + 1; }
false
false
false
false
false
0
globus_i_module_dump( FILE * out_f) { globus_list_t * module_list; globus_libc_fprintf(out_f, "==========\nModule List\n----------\n"); module_list = globus_l_module_list; while(!globus_list_empty(module_list)) { globus_list_t * client_list; globus_l_module_entry_t * module_entry;...
false
false
false
false
false
0
allocation_needed(int retval, b_blocknr_t allocated, struct item_head *ih, __le32 * item, int pos_in_item) { if (allocated) return 0; if (retval == POSITION_FOUND && is_indirect_le_ih(ih) && get_block_num(item, pos_in_item)) return 0; return 1; }
false
false
false
false
false
0
book_backend_google_stop_view (EBookBackend *backend, EDataBookView *bookview) { EBookBackendGooglePrivate *priv; GList *view; priv = E_BOOK_BACKEND_GOOGLE_GET_PRIVATE (backend); g_debug (G_STRFUNC); /* Remove the view from the list of active views */ if ((view = g_list_find (pri...
false
false
false
false
false
0
tps80031_remove(struct i2c_client *client) { struct tps80031 *tps80031 = i2c_get_clientdata(client); int i; if (tps80031_power_off_dev == tps80031) { tps80031_power_off_dev = NULL; pm_power_off = NULL; } mfd_remove_devices(tps80031->dev); regmap_del_irq_chip(client->irq, tps80031->irq_data); for (i = 0; ...
false
false
false
false
false
0
zend_duplicate_property_info(zend_property_info *property_info) /* {{{ */ { property_info->name = estrndup(property_info->name, property_info->name_length); if (property_info->doc_comment) { property_info->doc_comment = estrndup(property_info->doc_comment, property_info->doc_comment_len); } }
false
false
false
false
false
0
print_signer(hx509_context contextp, void *ctx, hx509_cert cert) { hx509_pem_header **header = ctx; char *signer_name = NULL; hx509_name name; int ret; ret = hx509_cert_get_subject(cert, &name); if (ret) errx(1, "hx509_cert_get_subject"); ret = hx509_name_to_string(name, &signer_name); ...
false
false
false
false
false
0
Atalasify(size_t iSizeInBytes, const UINTVECTOR3& vMaxBrickSize, const UINT64VECTOR3& vCurrBrickSize, const UINTVECTOR2& atlasSize, uint8_t* pDataSource, uint8_t* pDataTarget) { ...
false
false
false
false
false
0
make_match(ScmRegexp *rx, ScmString *orig, struct match_ctx *ctx) { ScmRegMatch *rm = SCM_NEW(ScmRegMatch); const ScmStringBody *origb; SCM_SET_CLASS(rm, SCM_CLASS_REGMATCH); rm->numMatches = rx->numGroups; rm->grpNames = rx->grpNames; /* we keep information of original ...
false
false
false
false
false
0
svga_tilecursor(void __iomem *regbase, struct fb_info *info, struct fb_tilecursor *cursor) { u8 cs = 0x0d; u8 ce = 0x0e; u16 pos = cursor->sx + (info->var.xoffset / 8) + (cursor->sy + (info->var.yoffset / 16)) * (info->var.xres_virtual / 8); if (! cursor -> mode) return; svga_wcrt_mask(regbase, 0x0A, ...
false
false
false
false
false
0
gwy_tool_path_level_selection_changed(GwyPlainTool *plain_tool, gint hint) { GwyToolPathLevel *tool; GwyNullStore *store; gint n; tool = GWY_TOOL_PATH_LEVEL(plain_tool); store = GWY_NULL_STORE(tool->model); n = gwy_null_store_get_n_rows(store); g_return...
false
false
false
false
false
0
dump_monsters(ang_file *fff) { int i; for (i = 0; i < z_info->r_max; i++) { monster_race *r_ptr = &r_info[i]; byte attr = r_ptr->x_attr; wint_t chr = r_ptr->x_char; /* Skip non-entries */ if (!r_ptr->name) continue; file_putf(fff, "# Monster: %s\n", r_ptr->name); file_putf(fff, "R:%d:%d:%d\n", i, at...
false
false
false
false
false
0
get_id_from_digit_string (const char *digit_string, uid_t *id) { long scanned_id; char c; g_assert (id != NULL); /* Only accept string if it has one integer with nothing * afterwards. */ if (sscanf (digit_string, "%ld%c", &scanned_id, &c) != 1) { return FALSE; } *id = scanned_id; return TRUE; }
false
false
false
false
false
0
cgcef_newscn(CGCEf *cgcef) { CGCEf_Scn *scn; if (!cgcef) { return NULL; } cgcef_assert(cgcef->e_magic == CGCEF_MAGIC); if (!cgcef->e_readable && !cgcef->e_ehdr) { seterr(ERROR_NOEHDR); } else if (cgcef->e_kind != CGCEF_K_CGCEF) { seterr(ERROR_NOTCGCEF); } else if (!cgcef->e_ehdr ...
false
false
false
false
false
0
evd_http_connection_set_current_request (EvdHttpConnection *self, EvdHttpRequest *request) { g_return_if_fail (EVD_IS_HTTP_CONNECTION (self)); if (request == self->priv->current_request) return; if (self->priv->current_request != NULL) g_object_unref (self->pr...
false
false
false
false
false
0
hx509_cert_get_attribute(hx509_cert cert, const heim_oid *oid) { size_t i; for (i = 0; i < cert->attrs.len; i++) if (der_heim_oid_cmp(oid, &cert->attrs.val[i]->oid) == 0) return cert->attrs.val[i]; return NULL; }
false
false
false
false
false
0
determine_encoding (void) { if (this->start_ == 0) return -1; char input[4] = {0,0,0,0}; char* sptr = (char*)this->start_; int i = 0; for ( ; i < 4 && sptr != (char*)this->end_; ++sptr, ++i) input[i] = *sptr; const ACEXML_Char* temp = ACEXML_Encoding::get_encoding (input); if (!temp) return -...
false
false
false
false
false
0
omapi_connection_require (omapi_object_t *h, unsigned bytes) { omapi_connection_object_t *c; if (h -> type != omapi_type_connection) return DHCP_R_INVALIDARG; c = (omapi_connection_object_t *)h; c -> bytes_needed = bytes; if (c -> bytes_needed <= c -> in_bytes) { return ISC_R_SUCCESS; } return DHCP_R_NOTYE...
false
false
false
false
false
0
operator&(const Vector& v1, const Vector& v2) { int N = v1.getn(); if(N != v2.getn()){ cerr << "cannot do outer product of " << N << " Vector with " << v2.getn() << " Vector" << endl; exit(1); } int i, j; Matrix product(N, N); for(i = 0; i < N; i++) for(j = 0; j < N; j++) product.row[i][j] = v1[i] ...
false
false
false
false
false
0
getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, const core::aabbox3d<f32>& box, const core::matrix4* transform) const { s32 outWritten = 0; for (u32 i=0; i<TriangleSelectors.size(); ++i) { s32 t = 0; TriangleSelectors[i]->getTriangles(triangles + outWritten, arra...
false
false
false
false
false
0
check_after_analyze() { if (!PROJECT_name || PROJECT_name[0] == 0) raise_error("No project name"); if (!PROJECT_startup || PROJECT_startup[0] == 0) raise_error("No startup class"); if (!PROJECT_title || PROJECT_title[0] == 0) PROJECT_title = PROJECT_name; }
false
false
false
false
false
0
gamgi_engine_create_direction (void) { gamgi_direction *old_direction = gamgi->direction_end, *direction; /******************* * allocate memory * *******************/ direction = GAMGI_CAST_DIRECTION malloc (sizeof (gamgi_direction)); /************************* * initialise down links * ***********************...
false
false
false
false
false
0
search_try_next(struct request *const req) { if (req->search_state) { /* it is part of a search */ char *new_name; struct request *newreq; req->search_index++; if (req->search_index >= req->search_state->num_domains) { /* no more postfixes to try, however we may need to try */ /* this name without a po...
false
false
false
false
false
0
transport_move(piece_info_t *obj) { void tt_do_move(); loc_t new_loc; /* empty transports can attack */ if (obj->count == 0) { /* empty? */ obj->func = 0; /* transport is loading */ new_loc = find_attack (obj->loc, tt_attack, "."); if (new_loc != obj->loc) { /* something to attack? */ attack (...
false
false
false
false
false
0
get_binary(FILE *fp, void *ptr, size_t len) { long n; trace(("get_binary(%ld)\n{\n", (long)len)); n = fread(ptr, 1, len, fp); if ((size_t)n != len) { if (ferror(fp)) nfatal("reading pipe"); fatal_raw("reading pipe: proxy protocol error (%d)", getpid()); } trace(("}\n")); }
false
false
false
false
false
0
clone_imagename(char *buf, size_t len, int clones) { if (clones > 0) snprintf(buf, len, "%s-clone%d", iname, clones); else strncpy(buf, iname, len); }
false
false
false
false
false
0
typeCmd(const char* name) { if (strcasecmp(name, "I") == 0) type = TYPE_I; else if (strcasecmp(name, "A") == 0) type = TYPE_A; else if (strcasecmp(name, "L") == 0) type = TYPE_L; else { reply(504, "Type %s not supported.", name); return; } reply(200, "Type set to %s.", typenames[type]); }
false
false
false
false
false
0
print_block_array_consumption_production(Block *bpt) { Module_table *module = bpt->module; if (bpt->array_info == NULL) return; mfprintf(stdout, "%B(line %d)", bpt, block_line_no(bpt) ); fprintf(stdout,"\n"); fprintf(stdout,"---<<< ExposedUse >>>---\n"); print_array_du_semnode(module,...
false
false
false
false
false
0
show_in_max(struct device *dev, struct device_attribute *attr, char *buf) { int nr = (to_sensor_dev_attr(attr))->index; struct lm93_data *data = lm93_update_device(dev); int vccp = nr - 6; long rc, vid; if ((nr == 6 || nr == 7) && vccp_limit_type[vccp]) { vid = LM93_VID_FROM_REG(data->vid[vccp]); rc = L...
false
true
false
false
false
1
get_index_constraint(Oid indexId) { Oid constraintId = InvalidOid; Relation depRel; ScanKeyData key[3]; SysScanDesc scan; HeapTuple tup; /* Search the dependency table for the index */ depRel = heap_open(DependRelationId, AccessShareLock); ScanKeyInit(&key[0], Anum_pg_depend_classid, BTEqualStrategy...
false
false
false
false
false
0
romfs_iget(struct super_block *sb, unsigned long pos) { struct romfs_inode_info *inode; struct romfs_inode ri; struct inode *i; unsigned long nlen; unsigned nextfh; int ret; umode_t mode; /* we might have to traverse a chain of "hard link" file entries to get * to the actual file */ for (;;) { ret = romfs...
false
false
false
false
false
0
ReadExtensions(int nr) { wxChoice* cmb = XRCCTRL(*this, "lstExt", wxChoice); cmb->Clear(); for (size_t i = 0; i < m_Commands[nr].size(); ++i) cmb->Append(GetStringFromArray(m_Commands[nr][i].extensions, DEFAULT_ARRAY_SEP, false)); cmb->SetSelection(cmb->FindString(wxEmptyString)); }
false
false
false
false
false
0
set_char(int x, int y, int c, int fg, int bg, int width, int lines) { byte_t *chr = vis->get_memory(); int xx, yy, pix, col_fg, col_bg, addr; addr = width * y + x; c *= 8; x *= 8; y *= lines; y += 20; // move smaller screen a little bit to // the center of the window if (lines < 10) y += (10 ...
false
false
false
false
false
0
PyCMOR_get_cur_dataset_attribute(PyObject *self,PyObject *args) { char *name; char value[CMOR_MAX_STRING]; int ierr; if (!PyArg_ParseTuple(args,"s",&name)) return NULL; ierr = cmor_get_cur_dataset_attribute(name,value); if (ierr != 0 ) return NULL; return Py_BuildValue("s",value); }
false
false
false
false
false
0
show_toolbar() { #ifdef _DEBUG std::cout << "DragableNoteBook::show_toolbar\n"; #endif if( ! m_show_toolbar && m_notebook_toolbar.get_n_pages() ){ remove( m_notebook_view ); pack_start( m_notebook_toolbar, Gtk::PACK_SHRINK ); pack_start( m_notebook_view ); m_show_toolbar = tr...
false
false
false
false
false
0
init ( int _x, int _y, int xsize, int ysize, int _xp, int _yp ) { x1 = _x; y1 = _y; x2 = _x + xsize; y2 = _y + ysize; xp = _xp; yp = _yp; if ( x1 < 0 ) x1 = 0; if ( y1 < 0 ) y1 = 0; if ( x2 >= ai->activemap->xsize ) x2 = ai->activemap->xsize-1; if ( y2 >= ai->activemap->ysize ) y2 = ai->...
false
false
false
false
false
0
bebob_update(struct fw_unit *unit) { struct snd_bebob *bebob = dev_get_drvdata(&unit->device); if (bebob == NULL) return; fcp_bus_reset(bebob->unit); snd_bebob_stream_update_duplex(bebob); if (bebob->deferred_registration) { if (snd_card_register(bebob->card) < 0) { snd_bebob_stream_destroy_duplex(bebob)...
false
false
false
false
false
0
gt_initeqsvector(unsigned long *eqsvector, unsigned long eqslen, const GtUchar *pattern, unsigned long patternlength) { unsigned long *eptr, shiftmask; const GtUchar *pptr; gt_assert(patternlength <= (unsigned long) (CHAR_BIT * sizeof (unsigned...
false
false
false
false
false
0
notes_parse(int dl[], char *s) { int i = 0; int idl = 0; do { while (s[i] == ';') i++; if (s[i]) { if (s[i] == '-') dl[idl] = 1; else dl[idl] = atoi(s + i); idl++; while ((s[i]) && (s[i] != '-') && (s[i] != ';')) i++; if (s[i] == '-') { ...
false
false
false
false
false
0
traffic_stats_update(traffic_stats_t *pkt_stat, double avg_time, double proto_expire_time) { traffic_stats_purge_expired_packets(pkt_stat, avg_time, proto_expire_time); if (!g_queue_is_empty(&pkt_stat->pkt_list)) { gdouble ms_from_oldest = avg_time; #if CHECK_EXPIRATION /* the last packet of the l...
false
false
false
false
false
0
camel_read_mir_callback (gpointer ref, gint ncol, gchar **cols, gchar **name) { struct _db_pass_data *data = (struct _db_pass_data *) ref; CamelFolderSummary *summary = data->summary; CamelMIRecord *mir; CamelMessageInfo *info; gint ret = 0...
false
false
false
false
false
0
do_log(int priority, const char *fmt, va_list ap) { if (log_syslog) vsyslog(priority, fmt, ap); else { printf("%s: ", log_prefix); vprintf(fmt, ap); printf("\n"); } }
false
false
false
false
false
0
bdx_hw_start(struct bdx_priv *priv) { int rc = -EIO; struct net_device *ndev = priv->ndev; ENTER; bdx_link_changed(priv); /* 10G overall max length (vlan, eth&ip header, ip payload, crc) */ WRITE_REG(priv, regFRM_LENGTH, 0X3FE0); WRITE_REG(priv, regPAUSE_QUANT, 0x96); WRITE_REG(priv, regRX_FIFO_SECTION, 0x800...
false
false
false
false
false
0
primitive_callstack(void) { F_STACK_FRAME *top = capture_start(); F_STACK_FRAME *bottom = stack_chain->callstack_bottom; F_FIXNUM size = (CELL)bottom - (CELL)top; if(size < 0) size = 0; F_CALLSTACK *callstack = allot_callstack(size); memcpy(FIRST_STACK_FRAME(callstack),top,size); dpush(tag_object(callstack))...
false
false
false
false
false
0
i2c_bus_probe(struct viafb_shared *shared) { /* should be always CRT */ printk(KERN_INFO "viafb: Probing I2C bus 0x26\n"); shared->i2c_26 = via_aux_probe(viafb_find_i2c_adapter(VIA_PORT_26)); /* seems to be usually DVP1 */ printk(KERN_INFO "viafb: Probing I2C bus 0x31\n"); shared->i2c_31 = via_aux_probe(viafb_fi...
false
false
false
false
false
0
inf_xml_util_string_to_long(const gchar* attribute, const xmlChar* value, glong* output, GError** error) { long converted; char* endptr; errno = 0; converted = strtol((const char*)value, &endptr, 0); if(*value == '\0' || *en...
false
false
false
false
false
0
envz_add (char **envz, size_t *envz_len, const char *name, const char *value) { envz_remove (envz, envz_len, name); if (value) /* Add the new value, if there is one. */ { size_t name_len = strlen (name); size_t value_len = strlen (value); size_t old_envz_len = *envz_len; size_t new...
false
true
false
false
false
1
run_list_tests(void) { if (this->formatter != NULL) formatter->setDisplayFullName(hasMultipleTestCase()); this->listener.onListingStart(); for(svutTestCasePtrList::iterator it=suites.begin();it!=suites.end();it++) { if (testFilter == NULL || testFilter->accept((*it)->getName())) (*it)->listTestMethods(listen...
false
false
false
false
false
0
dst_get_frontend(struct dvb_frontend *fe) { struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct dst_state *state = fe->demodulator_priv; p->frequency = state->decode_freq; if (state->dst_type == DST_TYPE_IS_SAT) { if (state->type_flags & DST_TYPE_HAS_OBS_REGS) p->inversion = state->inversion; ...
false
false
false
false
false
0
snd_asihpi_cmode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char * const mode_names[HPI_CHANNEL_MODE_LAST + 1] = { "invalid", "Normal", "Swap", "From Left", "From Right", "To Left", "To Right" }; u32 h_control = kcontrol->private_value; u16 mode; int i; const...
false
false
false
false
false
0
isActiveDirectedPathBetween(Variable* u, Variable *v) { if(u==v) return true; for (Cit c=u->out.begin();c!=u->out.end();++c) { if(canFollowRight(*c,NULL)) { if(isActiveDirectedPathBetween((*c)->right,v)) { (*c)->visited=true; return true; } (*c)->visited=false; } } return false; }
false
false
false
false
false
0
GetVectorVariableValue(const char* inVariableName) { int i; char* variableName = this->RemoveSpacesFrom(inVariableName); for (i = 0; i < this->NumberOfVectorVariables; i++) { if (strcmp(variableName, this->VectorVariableNames[i]) == 0) { delete [] variableName; return this->VectorVariab...
false
false
false
false
false
0
http_range_item_to_string(const struct http_range_item * const hri) { static char buf[FILESIZE_DEC_BUFLEN * 2 + 1]; if (NULL == hri) return "null"; http_range_item_check(hri); str_bprintf(buf, sizeof buf, "%s-%s", filesize_to_string(hri->start), filesize_to_string2(hri->end)); return buf; }
false
false
false
false
false
0
help(struct cmd_context *cmd __attribute__((unused)), int argc, char **argv) { int ret = ECMD_PROCESSED; if (!argc) _display_help(); else { int i; for (i = 0; i < argc; i++) if (!_usage(argv[i])) ret = EINVALID_CMD_LINE; } return ret; }
false
false
false
false
false
0
zsysdep_uupick (zsysarg, zpubdir, pzfrom, pzfull) const char *zsysarg; const char *zpubdir ATTRIBUTE_UNUSED; char **pzfrom; char **pzfull; { struct dirent *qentry; while (TRUE) { while (qSsysdir == NULL) { const char *zsystem; char *zdir; if (qStopdir == NULL) return N...
false
false
false
false
false
0
mdsModel(vtx_data * graph, int nG) { int i, j, e; float *Dij; int shift = 0; double delta; if (graph->ewgts == NULL) return 0; /* first, compute shortest paths to fill in non-edges */ Dij = compute_weighted_apsp_packed(graph, nG); /* then, replace edge entries will user-supplied len ...
false
false
false
false
true
1
ahd_done_with_status(struct ahd_softc *ahd, struct scb *scb, uint32_t status) { cam_status ostat; cam_status cstat; ostat = ahd_get_transaction_status(scb); if (ostat == CAM_REQ_INPROG) ahd_set_transaction_status(scb, status); cstat = ahd_get_transaction_status(scb); if (cstat != CAM_REQ_CMP) ahd_freeze_scb(...
false
false
false
false
false
0
ProcessFile(const char *inputFile, const char *stringName, bool buildHeader, const std::string &fileName) { FILE *fp=fopen(inputFile, "r"); if(!fp) { cout << "Cannot open file: " << inputFile << " (check path and p...
false
false
false
false
false
0