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
pvr2_sysfs_add_debugifc(struct pvr2_sysfs *sfp) { struct pvr2_sysfs_debugifc *dip; int ret; dip = kzalloc(sizeof(*dip),GFP_KERNEL); if (!dip) return; sysfs_attr_init(&dip->attr_debugcmd.attr); dip->attr_debugcmd.attr.name = "debugcmd"; dip->attr_debugcmd.attr.mode = S_IRUGO|S_IWUSR|S_IWGRP; dip->attr_debugcmd....
false
false
false
false
false
0
FindLayers() { OCGs* optContentConfig = poDocPoppler->getOptContentConfig(); if (optContentConfig == NULL || !optContentConfig->isOk() ) return; Array* array = optContentConfig->getOrderArray(); if (array) { GDALPDFArray* poArray = GDALPDFCreateArray(array); ExploreLayers(po...
false
false
false
false
false
0
cut_utils_append_diff (const gchar *message, const gchar *from, const gchar *to) { gchar *diff, *result; diff = cut_diff_readable(from, to); if (cut_diff_readable_is_interested(diff)) { result = g_strdup_printf("%s\n" "\n" "diff:\n" ...
false
false
false
false
false
0
Oligo_setup (int index1part) { oligosize = index1part; if (index1part == 6) { repetitive_oligos = repetitive_oligos_6; } else if (index1part == 7) { repetitive_oligos = repetitive_oligos_7; } else if (index1part == 8) { repetitive_oligos = repetitive_oligos_8; } else if (index1part == 9) { re...
false
false
false
false
false
0
othello_eval_weights (Pos *pos) { static int weights8 [4][4] = { { 500, -240, 85, 69 }, { 0 , -130, 49, 23 }, { 0 , 0, 1, 9 }, { 0 , 0, 0, 32 }, }; // FIXME: find a decent weight set static int weights6 [3][3] = { { 500, -200, 80}, { 0 , -300, 50}, { 0 , 0, 20}, }; int i, j, ...
false
false
false
false
true
1
camel_ews_store_summary_get_folder_id_from_name (CamelEwsStoreSummary *ews_summary, const gchar *folder_name) { gchar *folder_id; g_return_val_if_fail (ews_summary != NULL, NULL); g_return_val_if_fail (folder_name != NULL, NULL); S_LOCK (ews_summary); folder_id =...
false
false
false
false
false
0
dvb_usbv2_reset_resume(struct usb_interface *intf) { struct dvb_usb_device *d = usb_get_intfdata(intf); int ret; dev_dbg(&d->udev->dev, "%s:\n", __func__); dvb_usbv2_device_power_ctrl(d, 1); if (d->props->init) d->props->init(d); ret = dvb_usbv2_resume_common(d); dvb_usbv2_device_power_ctrl(d, 0); return...
false
false
false
false
false
0
is_numeric(parse_rec *objrec) { char *s; if (objrec->num!=0 || objrec->info==D_NUM) return 1; if (objrec->adj!=0) return 0; if (objrec->noun<=0) return 0; int tmp = strtol(dict[objrec->noun],&s,10); return (*s==0); /* *s==0 means no error-- it parsed as a number. */ }
false
false
false
false
false
0
is_founder(mychan_t *mychan, myentity_t *mt) { return_val_if_fail(mt != NULL, false); if (chanacs_find(mychan, mt, CA_FOUNDER)) return true; return false; }
false
false
false
false
false
0
ajSqlstatementGetIdentifier(const AjPSqlstatement sqls) { ajuint identifier = 0; #ifdef HAVE_MYSQL MYSQL *Pmysql = NULL; #endif /* HAVE_MYSQL */ #ifdef HAVE_POSTGRESQL PGresult *Ppgresult = NULL; #endif /* HAVE_POSTGRESQL */ if(!sqls) return 0; switch(sqls->Sqlconnection->Client) ...
false
false
false
false
false
0
slapi_mods_add_mod_values( Slapi_Mods *smods, int modtype, const char *type, Slapi_Value **va ) { LDAPMod *mod; if (NULL == smods) { return; } mod = (LDAPMod *) slapi_ch_malloc( sizeof(LDAPMod) ); mod->mod_type = slapi_ch_strdup( type ); mod->mod_op = modtype | LDAP_MOD_BVALUES; mod->mod_bvalues...
false
false
false
false
false
0
netxen_md_rdmem(struct netxen_adapter *adapter, struct netxen_minidump_entry_rdmem *memEntry, u64 *data_buff) { u64 addr, value = 0; int i = 0, loop_cnt; addr = (u64)memEntry->read_addr; loop_cnt = memEntry->read_data_size; /* This is size in bytes */ loop_cnt /= sizeof(value); for (i = 0; i < loop_cnt;...
false
false
false
false
false
0
rtp_source_reset (RTPSource * src) { src->marked_bye = FALSE; if (src->bye_reason) g_free (src->bye_reason); src->bye_reason = NULL; src->sent_bye = FALSE; src->stats.cycles = -1; src->stats.jitter = 0; src->stats.transit = -1; src->stats.curr_sr = 0; src->stats.sr[0].is_valid = FALSE; src->sta...
false
false
false
false
false
0
Nget_current_cutplane_cmd(Nv_data * data, Tcl_Interp * interp, /* Current interpreter. */ int argc, /* Number of arguments. */ char **argv /* Argument strings. */ ) { char curr[128]; if (data->CurCplane == -1) { sprintf(curr, "None"); } else { sprintf(curr, "Ncutplane%d", data->...
false
false
false
false
false
0
nak(int error) { struct tftphdr *tp; int length; struct errmsg *pe; tp = &buf.hdr; tp->th_opcode = htons((unsigned short)opcode_ERROR); tp->th_code = htons((unsigned short)error); for (pe = errmsgs; pe->e_code >= 0; pe++) if (pe->e_code == error) break; if (pe->e_code < 0) { pe->e_msg = s...
false
true
false
false
false
1
pushclosure (LexState *ls, FuncState *func, expdesc *v) { FuncState *fs = ls->fs; Proto *f = fs->f; int oldsize = f->sizep; int i; luaM_growvector(ls->L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, "constant table overflow"); while (oldsize < f->sizep) f->p[oldsize++] = NULL; f->p[fs->np...
false
false
false
false
false
0
win_new_width(wp, width) win_T *wp; int width; { wp->w_width = width; wp->w_lines_valid = 0; changed_line_abv_curs_win(wp); invalidate_botline_win(wp); if (wp == curwin) { update_topline(); curs_columns(TRUE); /* validate w_wrow */ } redraw_win_later(wp, CLEAR); wp->w_redr...
false
false
false
false
false
0
gt_feature_index_get_seqids(const GtFeatureIndex *feature_index, GtError *err) { GtStrArray *strarr; gt_assert(feature_index && feature_index->c_class); gt_rwlock_rdlock(feature_index->pvt->lock); strarr = feature_index->c_class->get_seqids(feature_index, err); gt_rwloc...
false
false
false
false
false
0
Splat(const CameraSample &sample, const Spectrum &L) { if (L.HasNaNs()) { Warning("ImageFilm ignoring splatted spectrum with NaN values"); return; } float xyz[3]; L.ToXYZ(xyz); int x = Floor2Int(sample.imageX), y = Floor2Int(sample.imageY); if (x < xPixelStart || x - xPixelStart ...
false
false
false
false
false
0
cavan_xml_document_parse(const char *pathname) { size_t size; char *content; struct cavan_xml_document *doc; content = file_read_all(pathname, 0, &size); if (content == NULL) { return NULL; } doc = cavan_xml_document_parse_base(content, size); if (doc == NULL) { goto out_free_content; } cavan_xml_doc...
false
false
false
false
false
0
magnet_add_search(struct magnet_resource *res, const char *search) { g_return_if_fail(res); g_return_if_fail(search); res->searches = g_slist_prepend(res->searches, deconstify_gchar(atom_str_get(search))); }
false
false
false
false
false
0
currentViewIsIconView() { if (m_currentView == NULL) return true; return (m_currentView == m_iconView); }
false
false
false
false
false
0
log_test_fd (int fd) { if (logstream) { int tmp = fileno (logstream); if ( tmp != -1 && tmp == fd) return 1; } if (log_socket != -1 && log_socket == fd) return 1; return 0; }
false
false
false
false
false
0
lx_chk_devicename (int guess_devnum, char *name, size_t name_len, int host, int channel, int id, int lun) { int dev_fd; if (host < 0) return 0; if (0 != lx_devfs) { /* simple mapping if we have devfs */ if (-1 == lx_devfs) { if ((dev_fd = lx_mk_devicename (guess_devnum...
false
false
false
false
false
0
oscSin(float phase, float spp, float param1) { /* compute sine-osc value TODO: lookup table or some kind of speedup */ float out; param1 = param1 / 2 + 0.5; if (phase < spp * param1) { /* split sine-wave at a point, specified by param1 */ out = sin(phase * twoPi / spp / (2 * param1)); /* readjust freq for first ...
false
false
false
false
false
0
interpret_standby(uint8_t standby) { printf(" ("); if (standby == 0) { printf("off"); } else if (standby <= 240 || standby == 252 || standby == 255) { /* standby is in 5 sec units */ unsigned t = standby * 5; printf("%u minutes %u seconds", t / 60, t % 60); } else if (standby <= 251) { unsigned t = (stand...
false
false
false
false
false
0
drawBlipsSorted(int distort) { g3_start_instance_matrix(&vmd_zero_vector, &view_perturb, false); vm_vec_zero(&target_position); // draw dim blips first, then bright blips for (int is_bright = 0; is_bright < 2; is_bright++) { drawBlips(BLIP_TYPE_JUMP_NODE, is_bright, distort); drawBlips(BLIP_TYPE_WARPING_SHIP,...
false
false
false
false
false
0
decode_lines(void) { if (show_linenumbers) { printf("%6d: ",show_offsets ? token_streampos : linenum++); } }
false
false
false
false
false
0
emowse_get_index(double actmw, double maxmw, double minmw, EmbPMolFrag const *frags, ajint fno, double *bestmw, ajint *myindex, ajint thys, const AjPSeq seq, EmbPMdata const *data) { double mw1; double mw2; double best; ajint cnt; ajint fl; ajint bidx = 0; ...
false
false
false
false
false
0
jDigits() { string str; char c = stream_->get(); if (!isdigit(c)) { parseError("digit", c); } str.push_back(c); while(isdigit(c = stream_->get())) { str.push_back(c); } stream_->unget(); return str; }
false
false
false
false
false
0
fm6_miter_next(fmsmem_i *m) { m->tmpvec[0].n = m->tmpvec[1].n = m->match.n = 0; if (m->start >= m->len || m->start < 0) return -1; m->start = fm6_smem1_core(m->e, m->len, m->q, m->start, &m->match, 0, &m->tmpvec[0], &m->tmpvec[1]); return m->start; }
false
false
false
false
false
0
ubifs_tnc_bulk_read(struct ubifs_info *c, struct bu_info *bu) { int lnum = bu->zbranch[0].lnum, offs = bu->zbranch[0].offs, len, err, i; struct ubifs_wbuf *wbuf; void *buf; len = bu->zbranch[bu->cnt - 1].offs; len += bu->zbranch[bu->cnt - 1].len - offs; if (len > bu->buf_len) { ubifs_err(c, "buffer too small %...
false
false
false
false
false
0
abraca_volume_button_apply_volume (AbracaVolumeButton* self) { gboolean result = FALSE; GTimeVal now = {0}; GTimeVal _tmp0_; glong _tmp1_; GTimeVal _tmp2_; glong _tmp3_; glong d_sec; GTimeVal _tmp4_; glong _tmp5_; GTimeVal _tmp6_; glong _tmp7_; glong d_usec; gboolean _tmp8_ = FALSE; glong _tmp9_; gboolea...
false
false
false
false
false
0
__gf_free (void *free_ptr) { size_t req_size = 0; char *ptr = NULL; uint32_t type = 0; xlator_t *xl = NULL; if (!THIS->ctx->mem_acct_enable) { FREE (free_ptr); return; } if (!free_ptr) ...
false
false
false
true
true
1
grl_filesystem_source_browse (GrlSource *source, GrlSourceBrowseSpec *bs) { const gchar *id; GList *chosen_uris; GRL_DEBUG (__FUNCTION__); if (grl_pls_media_is_playlist (bs->container)) { grl_pls_browse_by_spec (source, NULL, bs); return; } id = grl_media_get_id (bs-...
false
false
false
false
false
0
mp4ff_read_sample_v2(mp4ff_t *f, const int track, const int sample,unsigned char *buffer) { int32_t result = 0; int32_t size = mp4ff_audio_frame_size(f,track,sample); if (size<=0) return 0; mp4ff_set_sample_position(f, track, sample); result = mp4ff_read_data(f,buffer,size); #ifdef ITUNES_DRM if (f->track[...
false
false
false
false
false
0
nv10_gr_load_pipe(struct nv10_gr_chan *chan) { struct nv10_gr *gr = chan->gr; struct pipe_state *pipe = &chan->pipe_state; struct nvkm_device *device = gr->base.engine.subdev.device; u32 xfmode0, xfmode1; int i; nv04_gr_idle(&gr->base); /* XXX check haiku comments */ xfmode0 = nvkm_rd32(device, NV10_PGRAPH_XFM...
false
false
false
false
false
0
drm_atomic_check_only(struct drm_atomic_state *state) { struct drm_device *dev = state->dev; struct drm_mode_config *config = &dev->mode_config; struct drm_plane *plane; struct drm_plane_state *plane_state; struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; int i, ret = 0; DRM_DEBUG_ATOMIC("checking %p\...
false
false
false
false
false
0
APar_PrintID32Metadata(bool quantum_listing) { uint8_t total_tracks = 0; uint8_t a_track = 0; AtomicInfo* metaAtom = NULL; AtomicInfo* metahandlerAtom = NULL; char trackmeta_atom_path[50]; printBOM(); //file level metaAtom = APar_FindAtom("meta", false, VERSIONED_ATOM, 0); metahandlerAtom = APar_FindAtom("...
false
false
false
false
false
0
writePreamble(bool useSetSpace) const { string preamble; switch (space) { case Default: case Single: // we dont use setspace.sty so dont print anything //return "\\singlespacing\n"; break; case Onehalf: preamble = useSetSpace ? "\\OnehalfSpacing\n" : "\\onehalfspacing\n"; break; case Double: pream...
false
false
false
false
false
0
GetItemName(edict_t * ent, char *buf) { int i; for(i = 0; i<ITEM_COUNT; i++) { if (INV_AMMO(ent, tnums[i])) { strcpy(buf, GET_ITEM(tnums[i])->pickup_name); return; } } strcpy(buf, "No Item"); }
false
false
false
false
false
0
run_game() { put_health(); put_temp(); if(delay_count) delay_count--; if(delay_count == 1) { if(enemies.exist_pipe()) delay_count = 2; else { int newship = next_state_out; put_info(); if(next_state_out) { retry(); if(ships <= 0) return; } if(next_state_next) next_sce...
false
false
false
false
false
0
xen_sync_pcpus(void) { /* * Boot cpu always have cpu_id 0 in xen */ uint32_t cpu = 0, max_cpu = 0; int err = 0; struct pcpu *pcpu, *tmp; mutex_lock(&xen_pcpu_lock); while (!err && (cpu <= max_cpu)) { err = sync_pcpu(cpu, &max_cpu); cpu++; } if (err) list_for_each_entry_safe(pcpu, tmp, &xen_pcpus, l...
false
false
false
false
false
0
ahc_unpause(struct ahc_softc *ahc) { if ((ahc_inb(ahc, INTSTAT) & (SCSIINT | SEQINT | BRKADRINT)) == 0) ahc_outb(ahc, HCNTRL, ahc->unpause); }
false
false
false
false
false
0
matvecmul4(m,v1,v2) matrix4 m; point4 v1,v2; { int i,j; double tmp[4], *tv1, *tv2; tv1 = (double *) v1; tv2 = (double *) v2; for (i=0; i<4; ++i) for (tmp[i]=0, j = 0; j<4; ++j) tmp[i] += m[i][j] * tv1[j]; for (i=0; i<4; ++i) tv2[i] = tmp[i]; }
false
false
false
false
false
0
IsDeadCheck(i::Isolate* isolate, const char* location) { return !isolate->IsInitialized() && i::V8::IsDead() ? ReportV8Dead(location) : false; }
false
false
false
false
false
0
dump_GLA( GLA *q ) #else dump_GLA( q ) GLA *q; #endif { GLA *prod, *p; fprintf(stderr,"o-->"); for (prod=q->p1; prod!=NULL; prod=prod->p2) { fprintf(stderr,"o"); for (p = prod; p->p1!=NULL;) { if ( p->visited ) break; p->visited = 1; if ( p-...
false
false
false
false
false
0
DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back) { if (dc()) { FillRectangle(rc, back); DrawTextBase(rc, font_, ybase, s, len, fore); } }
false
false
false
false
false
0
decode(std::istream& s) throw(gsmlib::GsmException) { std::string pdu; unsigned char ScToMe; s >> ScToMe; s >> pdu; return decode(pdu,ScToMe=='S'); }
false
false
false
false
false
0
rna(int rnatime, struct queue_ent *qe, char *interface, char *membername, int autopause) { ast_verb(3, "Nobody picked up in %d ms\n", rnatime); /* Stop ringing, and resume MOH if specified */ if (qe->ring_when_ringing) { ast_indicate(qe->chan, -1); ast_moh_start(qe->chan, qe->moh, NULL); } if (qe->parent->ev...
true
true
false
false
false
1
ensFeatureadaptorDel(EnsPFeatureadaptor *Pfa) { register ajuint i = 0U; EnsPFeatureadaptor pthis = NULL; if (!Pfa) return; #if defined(AJ_DEBUG) && AJ_DEBUG >= 1 if (ajDebugTest("ensFeatureadaptorDel")) ajDebug("ensFeatureadaptorDel\n" " *Pfa %p\n", *P...
false
false
false
false
false
0
mthca_init_av_table(struct mthca_dev *dev) { int err; if (mthca_is_memfree(dev)) return 0; err = mthca_alloc_init(&dev->av_table.alloc, dev->av_table.num_ddr_avs, dev->av_table.num_ddr_avs - 1, 0); if (err) return err; dev->av_table.pool = pci_pool_create("mthca_av", dev->pdev,...
false
false
false
false
false
0
check_locality(struct tpm_chip *chip, int l) { if ((ioread8(chip->vendor.iobase + TPM_ACCESS(l)) & (TPM_ACCESS_ACTIVE_LOCALITY | TPM_ACCESS_VALID)) == (TPM_ACCESS_ACTIVE_LOCALITY | TPM_ACCESS_VALID)) return chip->vendor.locality = l; return -1; }
false
false
false
false
false
0
shell_cmd_get_handler(const char *cmd) { static const struct { const char * const cmd; shell_cmd_handler_t handler; } commands[] = { #define SHELL_CMD(x) { #x, shell_exec_ ## x }, #include "cmd.inc" #undef SHELL_CMD }; size_t i; g_return_val_if_fail(cmd, NULL); for (i = 0; i < G_N_ELEMENTS(commands); i++) ...
false
false
false
false
false
0
color_list_remove_all(struct ColorList* color_list){ ColorList::iter i; if (color_list->on_clear){ color_list->on_clear(color_list); for (i=color_list->colors.begin(); i!=color_list->colors.end(); ++i){ color_object_release(*i); } }else{ for (i=color_list->colors.begin(); i!=color_list->colors.end(); ++i)...
false
false
false
false
false
0
load_theme_engine( TreeHandler *pConfig, MainWindow *pWindow, xmlNode *element) { if(!strcmp((char*)element->name, "engine")) { string name = Utils::Xml::get_property(element, "name"); string category = Utils::Xml::get_property(element, "category"); string disabled = Utils::X...
false
false
false
false
false
0
hub_match_callback(g2_connection_t *con, void *carg) { struct hub_match_carg *rdata = carg; struct qhtable *table; struct qht_data *qd; /* no point in touching dead connections */ if(unlikely(con->flags.dismissed)) return 0; do { mb(); hzp_ref(HZP_QHT, table = con->qht); } while(table != con->qht); if(...
false
false
false
false
false
0
core_get_resync_work(struct dm_dirty_log *log, region_t *region) { struct log_c *lc = (struct log_c *) log->context; if (lc->sync_search >= lc->region_count) return 0; do { *region = find_next_zero_bit_le(lc->sync_bits, lc->region_count, lc->sync_search); lc->sync_search = *region + 1; ...
false
false
false
false
false
0
checksum_range(const void *start, uint32_t size) { const uint8_t *p = start; uint8_t csum = 0; while (size--) csum += *p++; return csum; }
false
false
false
false
false
0
_validNodeTableId(NodeTable *table, guint id) { g_return_val_if_fail(table, FALSE); return id < table->idCounter; }
false
false
false
false
false
0
soup_cookie_jar_changed (SoupCookieJar *jar, SoupCookie *old, SoupCookie *new) { SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); if (old && old != new) g_hash_table_remove (priv->serials, old); if (new) { priv->serial++; g_hash_table_insert (priv->serials, new, GUINT_TO_POINTER (priv->seri...
false
false
false
false
false
0
got_headers (SoupMessage *msg, SoupClientContext *client) { SoupServer *server = client->server; SoupServerPrivate *priv = SOUP_SERVER_GET_PRIVATE (server); SoupURI *uri; SoupDate *date; char *date_string; SoupAuthDomain *domain; GSList *iter; gboolean rejected = FALSE; char *auth_user; uri = soup_message_ge...
false
false
false
false
false
0
gdict_client_context_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GdictClientContextPrivate *priv = GDICT_CLIENT_CONTEXT_GET_PRIVATE (object); switch (prop_id) { case PROP_HOSTNAME: if (priv->hostname) g_free (pr...
false
false
false
false
false
0
gist_enter( __isl_take isl_schedule_node *node, void *user) { struct isl_node_gist_data *data = user; do { isl_union_set *filter, *inner; int done, empty; int n; switch (isl_schedule_node_get_type(node)) { case isl_schedule_node_error: return isl_schedule_node_free(node); case isl_schedule_node_expa...
false
false
false
false
false
0
search_gui_guess_stats(gnet_search_t sh, const struct guess_stats *stats) { search_t *search; search = search_gui_find(sh); g_return_if_fail(search != NULL); search->guess_cur_pool = stats->pool; search->guess_cur_queried = stats->queried; search->guess_cur_acks = stats->acks; search->guess_cur_results =...
false
false
false
false
false
0
gtk_meter_adjustment_changed (GtkAdjustment *adjustment, gpointer data) { GtkMeter *meter; g_return_if_fail (adjustment != NULL); g_return_if_fail (data != NULL); meter = GTK_METER (data); if ((meter->old_lower != adjustment->lower) || (meter->old_upper != adjustment->upper)) { ...
false
false
false
false
false
0
xsh_rv_ref_wave_init(xsh_std_star_id std_star_id ,XSH_ARM arm, xsh_rv_ref_wave_param* w){ switch (arm) { case XSH_ARM_UVB: w->wguess = 486.1322; w->range_wmin=450; w->range_wmax=550; w->ipol_wmin_max=470; w->ipol_wmax_min=500; w->ipol_hbox=0.5; break; case XSH_ARM_VIS: w->wguess...
false
false
false
false
false
0
createTLOF(const Triple &TT) { if (TT.isOSBinFormatMachO()) return make_unique<TargetLoweringObjectFileMachO>(); if (TT.isOSWindows()) return make_unique<TargetLoweringObjectFileCOFF>(); return make_unique<ARMElfTargetObjectFile>(); }
false
false
false
false
false
0
buf_setmap(struct buf *buf, const char *base, unsigned len) { buf_reset(buf); if (len) { buf_ensure(buf, len); memcpy(buf->s, base, len); buf->len = len; } }
false
false
false
false
false
0
discid_get_sectors(DiscId *d) { mb_disc_private *disc = (mb_disc_private *) d; assert(disc != NULL); assert(disc->success); if (!disc->success) return -1; else return disc->track_offsets[0]; }
false
false
false
false
false
0
handle_alias_pairs (void) { alias_pair *p; unsigned i; for (i = 0; alias_pairs && alias_pairs->iterate (i, &p);) { symtab_node target_node = symtab_node_for_asm (p->target); /* Weakrefs with target not defined in current unit are easy to handle; they behave just as external variables except ...
false
false
false
false
false
0
loadlib(void) { const char *err; if (handle) return 0; handle = dlopen(LIBCAPI, RTLD_GLOBAL | RTLD_NOW); if (handle == 0) { err = dlerror(); (void)write(2, emsg, sizeof(emsg)-1); (void)write(2, LIBCAPI, sizeof(LIBCAPI)-1); (void)write(2, "\n", 1); if (err) { (void)write(2, err, strlen(err)); (void...
false
false
false
false
false
0
new_split ( gsb_real amount, gchar * account, gchar * categ ) { struct gnucash_split * split; split = calloc ( 1, sizeof ( struct gnucash_split )); split -> amount = amount; if ( account ) split -> account = my_strdup ( account ); else split -> account = NULL; if ( categ ) split -> category =...
false
false
false
false
false
0
record_use (struct def *def, df_ref use) { struct use *u = XNEW (struct use); u->pos = DF_REF_REAL_LOC (use); u->insn = DF_REF_INSN (use); u->addr_use_p = (DF_REF_TYPE (use) == DF_REF_REG_MEM_LOAD || DF_REF_TYPE (use) == DF_REF_REG_MEM_STORE); u->next = def->uses; def->uses = u; def->n_uses++; if ...
false
false
false
false
false
0
restoreBaseModel(int numberRows) { int currentNumberCuts = getNumRows()-numberRows; int *which = new int[currentNumberCuts]; for (int i = 0 ; i < currentNumberCuts ; i++) which[i] = i+numberRows; deleteRows(currentNumberCuts,which); delete [] which; }
false
false
false
false
false
0
ext2_setup_super (struct super_block * sb, struct ext2_super_block * es, int read_only) { int res = 0; struct ext2_sb_info *sbi = EXT2_SB(sb); if (le32_to_cpu(es->s_rev_level) > EXT2_MAX_SUPP_REV) { ext2_msg(sb, KERN_ERR, "error: revision level too high, " "forcing read-only mode"); res ...
false
false
false
false
false
0
OnHandshake(const unsigned char *srcmac, const unsigned char *dstmac, struct evbuffer *evb) { // Minimum handshake length: channel, msg type, rev channel, range, hash if (evbuffer_get_length(evb) < 13 + Sha1Hash::SIZE) { eprintf("%s #0 incorrect size in eth handshake\n", tintstr()); return; } ...
false
false
false
false
false
0
g_vfs_afp_server_mount_volume_sync (GVfsAfpServer *server, const char *volume_name, GCancellable *cancellable, GError **error) { GVfsAfpVolume *volume; volume = g_vfs_afp_volume_new (server, server->priv...
false
false
false
false
false
0
getMeshCornerElement(int index) { if ( index < 0 ) return NULL; MeshCornerElementList::iterator pos = modelData->meshCornerElements->begin(); MeshCornerElementList::iterator end_pos = modelData->meshCornerElements->end(); for (int i = 0; i < index && pos != end_pos; i++,pos++); if ( pos == end_pos ) { ...
false
false
false
false
false
0
_e_qa_entry_border_associate(E_Quick_Access_Entry *entry, E_Border *bd) { if (entry->exe) entry->exe = NULL; /* not waiting anymore */ entry->border = bd; /* FIXME: doesn't work, causes window to flicker on associate if (entry->config.hidden) _e_qa_border_deactivate(entry); */ _e_qa_entry_borde...
false
false
false
false
false
0
mp_set_ulong(mp_int *mp, unsigned long z) { int ix; mp_err res; ARGCHK(mp != NULL, MP_BADARG); mp_zero(mp); if(z == 0) return MP_OKAY; /* shortcut for zero */ if (sizeof z <= sizeof(mp_digit)) { DIGIT(mp,0) = z; } else { for (ix = sizeof(long) - 1; ix >= 0; ix--) { ...
false
false
false
false
false
0
index_mb(uint8_t cluster[], uint8_t cb[], int numCB, int *outIndex, int dim) { int i, lDiff = INT_MAX, pick=0; /* Diff against the others */ for (i=0; i<numCB; i++) { int diff = squared_diff_macroblock(cluster, cb + i*dim*dim*3, dim); if (diff < lDiff) { lDif...
false
false
false
false
false
0
readFileLine(ifstream& in_file, char* buffer, int linepos) { int i, j, buffer_len; for (i = 1; i <= linepos; i++) { buffer[0] = '\0'; if (in_file.eof()) { return; } in_file.getline(buffer, MAXLINE, '\n'); buffer[MAXLINE] = '\0'; buffer_len = strlen(buffer); // Change tabs an...
false
false
false
false
false
0
ssh_key_extract_comment (gcry_sexp_t key, char **comment) { gcry_sexp_t comment_list; char *comment_new; const char *data; size_t data_n; gpg_error_t err; comment_list = gcry_sexp_find_token (key, "comment", 0); if (! comment_list) { err = gpg_error (GPG_ERR_INV_SEXP); goto out; } ...
false
false
false
false
false
0
xputs(const char* s, FILE* fp, ei_x_buff* x) { if (fp != NULL) fputs(s, fp); else ei_x_append_buf(x, s, strlen(s)); }
false
false
false
false
false
0
cifs_getlk(struct file *file, struct file_lock *flock, __u32 type, bool wait_flag, bool posix_lck, unsigned int xid) { int rc = 0; __u64 length = 1 + flock->fl_end - flock->fl_start; struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data; struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); struc...
false
false
false
false
false
0
diva_driver_add_card(void *pdev, unsigned long CardOrdinal) { diva_os_spin_lock_magic_t old_irql; diva_os_xdi_adapter_t *pdiva, *pa; int i, j, max, nr; for (i = 0; divas_supported_cards[i].CardOrdinal != -1; i++) { if (divas_supported_cards[i].CardOrdinal == CardOrdinal) { if (!(pdiva = divas_create_pci_card(...
false
false
false
false
false
0
plottree(node *p, node *q) { /* plot part or all of tree on the plotting device */ double x1, y1, x2, y2; node *pp; x2 = xscale * (xoffset + p->xcoord); y2 = yscale * (yoffset + p->ycoord); if (p != root) { x1 = xscale * (xoffset + q->xcoord); y1 = yscale * (yoffset + q->ycoord); plot(penup, x1...
false
false
false
false
false
0
_gids_cache_purge(void) { int i; gids_cache_t *p, *q; for (i=0; i<GIDS_HASH_LEN; i++) { p = gids_hashtbl[i]; while (p) { q = p->next; _dealloc_gids_cache(p); p = q; } gids_hashtbl[i] = NULL; } }
false
false
false
false
false
0
new_fname FCN((pname,name,ext)) outer_char HUGE*HUGE*pname C0("") outer_char*name C0("") outer_char*ext C1("") { outer_char temp[MAX_FILE_NAME_LENGTH]; if(!name) *pname= GET_MEM("pname",DFLT_FNAME_LENGTH+1,outer_char); else { char ext_delimiter[2]; FILE*temp_file_ptr; ext_delimiter[0]= (char)wt_style.ext_delimiter;...
false
false
false
false
false
0
process_queue (CkVtMonitor *vt_monitor) { int i; int queue_length; EventData *data; EventData *d; g_async_queue_lock (vt_monitor->priv->event_queue); g_debug ("Processing VT event queue"); queue_length = g_async_queue_length_unlocked (vt_monitor->...
false
false
false
false
false
0
write_flush(mgs_handle_t * ctxt) { apr_bucket *e; if (!(ctxt->output_blen || ctxt->output_length)) { ctxt->output_rc = APR_SUCCESS; return 1; } if (ctxt->output_blen) { e = apr_bucket_transient_create(ctxt->output_buffer, ctxt->output_blen, ctxt->output_bb-> bucket_alloc); /* we filled t...
false
false
false
false
false
0
get_secrets_cb (AppletAgent *self, GHashTable *secrets, GError *error, gpointer user_data) { Request *r = user_data; /* 'secrets' shouldn't be valid if there was an error */ if (error) { g_warn_if_fail (secrets == NULL); secrets = NULL; } if (!g_cancellable_is_...
false
false
false
false
false
0
opal_datatype_copy_content_same_ddt( const opal_datatype_t* datatype, int32_t count, char* destination_base, char* source_base ) { OPAL_PTRDIFF_TYPE extent; int32_t (*fct)( const opal_datatype_t*, int32_t, char*, char*); #if OPAL_CUDA_SUPPORT bool cuda_device_bu...
false
false
false
false
false
0
GetComponentGlyphIds(const void * pSimpleGlyf, int * prgnCompId, size_t cnCompIdTotal, size_t & cnCompId) { using namespace Sfnt; if (GlyfContourCount(pSimpleGlyf) >= 0) return false; const Sfnt::SimpleGlyph * pGlyph = reinterpret_cast<const Sfnt::SimpleGlyph *>(pSimpleGlyf); // for a composite glyph, the s...
false
false
false
false
true
1
moveToNextSection(DataRefImpl &DRI) const { uint32_t LoadCommandCount = MachOObj->getHeader().NumLoadCommands; while (DRI.d.a < LoadCommandCount) { LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a); if (LCI.Command.Type == macho::LCT_Segment) { InMemoryStruct<macho::SegmentLoadCommand> Segme...
false
false
false
false
false
0
collect_obj_classes(char *ilets, struct obj *otmp, bool here, bool incl_gold, bool (*filter)(struct obj *), int *itemcount) { register int iletct = 0; register char c; *itemcount = 0; if (incl_gold) ilets[iletct++] = def_oc_syms[COIN_CLASS]; ilets[iletct] = '\0'; /* terminate ilets so t...
false
false
false
false
false
0
pattern_accum_get_bits_rectangle(gx_device * dev, const gs_int_rect * prect, gs_get_bits_params_t * params, gs_int_rect ** unread) { gx_device_pattern_accum *const padev = (gx_device_pattern_accum *) dev; const gs_pattern1_instance_t *pinst = padev->instance; if (padev->bits) ...
false
false
false
false
false
0
input_dialog_entry_insert_text (GtkEditable *editable, gchar *new_text, gint new_text_length, gint *position, GiggleInputDialog *input_dialog) { if (strchr (new_text, ' ')) { g_signal_stop_emission_by_name (editable, "insert-text"); } }
false
false
false
false
false
0
R3Contains(const R3Box& box, const R3Point& point) { // Return whether box contains point if (box.IsEmpty()) return FALSE; if (RNIsLess(point.X(), box.XMin())) return FALSE; if (RNIsLess(point.Y(), box.YMin())) return FALSE; if (RNIsLess(point.Z(), box.ZMin())) return FALSE; if (RNIsGreater(poin...
false
false
false
false
false
0