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
getStr(int col, void *entry) { if (!entry) return NULL; Symbol *l = ((Symbol *)entry); switch (col) { case 0: global_analyser_address_string_format = ADDRESS_STRING_FORMAT_LEADING_WHITESPACE; ht_snprintf(str, 1024, "%y", l->location->addr); break; case 1: ht_snprintf(str, 1024, "%s", label_type_short(l->ty...
false
false
false
false
false
0
ssqlistitems(LIST *lp) { LISTELEM *ep; VALUE *vp; VALUE term; VALUE tmp; VALUE sum; /* initialize VALUEs */ term.v_type = V_NULL; term.v_subtype = V_NOSUBTYPE; tmp.v_type = V_NULL; tmp.v_subtype = V_NOSUBTYPE; sum.v_type = V_NULL; sum.v_subtype = V_NOSUBTYPE; for (ep = lp->l_first; ep; ep = ep->e_next) {...
false
false
false
false
false
0
intif_party_addmember(struct map_session_data *sd) { nullpo_retv(sd); if (inter_fd < 0) return; WFIFOW(inter_fd, 0) = 0x3022; WFIFOL(inter_fd, 2) = sd->party_invite; WFIFOL(inter_fd, 6) = sd->status.account_id; WFIFOL(inter_fd,10) = sd->status.char_id; memcpy(WFIFOP(inter_fd,14),sd->status.name,24); memcpy(...
false
false
false
false
false
0
arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) { struct msi_controller *chip = dev->bus->msi; struct msi_desc *entry; int ret; if (chip && chip->setup_irqs) return chip->setup_irqs(chip, dev, nvec, type); /* * If an architecture wants to support multiple MSI, it needs to * override arch_setup_...
false
false
false
false
false
0
sasl_error() { #ifdef XMPP_DEBUG qDebug("sasl error: %d\n", d->sasl->authCondition()); #endif // has to be auth error int x = convertedSASLCond(); d->errText = tr("Offered mechanisms: ") + d->client.features.sasl_mechs.join(", "); reset(); d->errCond = x; error(ErrAuth); }
false
false
false
false
false
0
sqliteOpenTableAndIndices(Parse *pParse, Table *pTab, int base){ int i; Index *pIdx; Vdbe *v = sqliteGetVdbe(pParse); assert( v!=0 ); sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0); sqliteVdbeOp3(v, OP_OpenWrite, base, pTab->tnum, pTab->zName, P3_STATIC); for(i=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, ...
false
false
false
false
false
0
decrease_recharge_rate(object* obj, SYSTEM_TYPE ship_system) { int *lose_index=NULL, *gain_index1=NULL, *gain_index2=NULL, *tmp=NULL; int count; ship *ship_p = &Ships[obj->instance]; if (ship_p->flags2 & SF2_NO_ETS) return; switch ( ship_system ) { case WEAPONS: if ( !ship_has_energy_weapons(ship_p) ) ...
false
false
false
false
false
0
sd_init_12a(struct gspca_dev *gspca_dev) { PDEBUG(D_STREAM, "Chip revision: 012a"); init_161rev12A(gspca_dev); return 0; }
false
false
false
false
false
0
globus_validate_int( char * value, void * parms, char ** error_msg ) { int val; char * format; globus_validate_int_parms_t * range; if (!parms) { *error_msg = _GCSL(globus_l_vali...
false
false
false
false
false
0
kml_geocache_get_logs(const waypoint* wpt) { char* r = xstrdup(""); fs_xml* fs_gpx = (fs_xml*)fs_chain_find(wpt->fs, FS_GPX); xml_tag* root = NULL; xml_tag* curlog = NULL; xml_tag* logpart = NULL; if (!fs_gpx) { return r; } root = fs_gpx->tag; curlog = xml_findfirst(root, "groundspeak:log"); ...
false
false
false
false
false
0
gmenu_expose(struct gmenu *m, GEvent *event,GWindow pixmap) { GRect old1, old2; GRect r; int i; GDrawPushClip(pixmap,&event->u.expose.rect,&old1); r.x = 0; r.width = m->width; r.y = 0; r.height = m->height; GBoxDrawBackground(pixmap,&r,m->box,gs_active,false); GBoxDrawBorder(pixmap,&r,m->bo...
false
false
false
false
false
0
select_extend(Widget gw, XEvent *event, String *params, Cardinal *no_params) { TextFieldWidget w = (TextFieldWidget)gw; long x, y; w->textfield.waiting_for_sel = False; w->textfield.multiply = 1; if (!w->textfield.sel_set) return; if (!event_to_pos(w, event, &x, &y)) return; chang...
false
false
false
false
false
0
linked_attrs_config_index_has_type(char *type) { int rc = 0; PRCList *list = NULL; if (!PR_CLIST_IS_EMPTY(g_managed_config_index)) { list = PR_LIST_HEAD(g_managed_config_index); while (list != g_managed_config_index) { if (slapi_attr_type_cmp(((struct configIndex *)list)->config...
false
false
false
false
false
0
SiS_GetMCLK(struct SiS_Private *SiS_Pr) { unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; unsigned short index; index = SiS_Get310DRAMType(SiS_Pr); if(SiS_Pr->ChipType >= SIS_661) { if(SiS_Pr->SiS_ROMNew) { return((unsigned short)(SISGETROMW((0x90 + (index * 5) + 3)))); } return(SiS_P...
false
false
false
false
false
0
main (int argc, char **argv) { rtx desc; max_opno = -1; progname = "genpeep"; if (argc <= 1) fatal ("no input file name"); if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE) return (FATAL_EXIT_CODE); printf ("/* Generated automatically by the program `genpeep'\n\ from the machine descri...
false
false
false
false
false
0
RetrievedDocument(Document & doc, const String & url, DocumentRef * ref) { n_links = 0; current_ref = ref; current_title = 0; word_context.Anchor(0); current_time = 0; current_head = 0; current_meta_dsc = 0; // // Create a parser object and let it have a go at the document. // We will pass ourselves as a cal...
false
false
false
false
false
0
opal_shmem_base_runtime_query(mca_base_module_t **best_module, mca_base_component_t **best_component) { mca_base_component_list_item_t *cli = NULL; mca_base_component_t *component = NULL; mca_base_module_t *module = NULL; int priority = 0, best_priority = INT32_MIN; *b...
false
false
false
false
false
0
get_max_dlg_tag_in_layer(Hmdf_table *hmdf) { Block *bpt; int max = 0; for (bpt = hmdf->block->inner; bpt != NULL; bpt = bpt->next) { if (block_has_dlg_tag(bpt)) { if (max < bpt->dlg_tag) { max = bpt->dlg_tag; } } } return max; }
false
false
false
false
false
0
qr_is_ptr_call(Quadruple* qr) { return (lang_tag == LANG_C && qr->ope == OPE_CALL && qr->op[0]->kind == KIND_TEMP && qr->op[0]->tbl.t->func_entry != NULL); }
false
false
false
false
false
0
__isns_db_keystore_copy_policy_string(isns_object_t *obj, uint32_t tag, char **var) { const char *value; if (!isns_object_get_string(obj, tag, &value)) return; isns_assign_string(var, value); }
false
false
false
false
false
0
inode_free_security(struct inode *inode) { struct inode_security_struct *isec = inode->i_security; struct superblock_security_struct *sbsec = inode->i_sb->s_security; /* * As not all inode security structures are in a list, we check for * empty list outside of the lock to make sure that we won't waste * time ...
false
false
false
false
false
0
lpfc_debug_dump_all_queues(struct lpfc_hba *phba) { int fcp_wqidx; /* * Dump Work Queues (WQs) */ lpfc_debug_dump_mbx_wq(phba); lpfc_debug_dump_els_wq(phba); for (fcp_wqidx = 0; fcp_wqidx < phba->cfg_fcp_io_channel; fcp_wqidx++) lpfc_debug_dump_fcp_wq(phba, fcp_wqidx); lpfc_debug_dump_hdr_rq(phba); lpfc...
false
false
false
false
false
0
ole_write_bat (GsfOutput *sink, guint32 block, unsigned blocks) { guint8 buf[BAT_INDEX_SIZE * CHUNK_SIZE]; guint bufi = 0; while (blocks-- > 1) { block++; ADD_ITEM (block); } ADD_ITEM (BAT_MAGIC_END_OF_CHAIN); FLUSH; }
false
false
false
false
false
0
get_totsize(const filestruct *begin, const filestruct *end) { size_t totsize = 0; const filestruct *f; /* Go through the lines from begin to end->prev, if we can. */ for (f = begin; f != end && f != NULL; f = f->next) { /* Count the number of characters on this line. */ totsize += mbstrlen(f->data); ...
false
false
false
false
false
0
extract_options(struct cond_entry **conds, int eq) { struct value_list *list = NULL; struct cond_entry *entry, *tmp, *prev = NULL; list_for_each_safe(*conds, entry, tmp) { if ((strcmp(entry->name, "options") == 0 || strcmp(entry->name, "option") == 0) && entry->eq == eq) { list_remove_at(*conds, ...
false
false
false
true
false
1
regtypeout(PG_FUNCTION_ARGS) { Oid typid = PG_GETARG_OID(0); char *result; HeapTuple typetup; if (typid == InvalidOid) { result = pstrdup("-"); PG_RETURN_CSTRING(result); } typetup = SearchSysCache1(TYPEOID, ObjectIdGetDatum(typid)); if (HeapTupleIsValid(typetup)) { Form_pg_type typeform = (Form_...
false
false
false
false
false
0
ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt) { struct ath10k *ar = htt->ar; struct sk_buff *skb; struct htt_cmd *cmd; int len = 0; int ret; len += sizeof(cmd->hdr); len += sizeof(cmd->ver_req); skb = ath10k_htc_alloc_skb(ar, len); if (!skb) return -ENOMEM; skb_put(skb, len); cmd = (struct htt_cmd ...
false
false
false
false
false
0
findVariable (const string &name, int &level, int access, SourceLocation *source, Package **p) { Variable *var ; level = 0 ; Scope *scope = currentScope ; Scope *foundScope ; while (scope != NULL) { if ((var = scope->findVariable (name, foundScope, access, source, p)) != NULL) { ...
false
false
false
false
false
0
app_gtkmm_icon_theme_has_icon(Glib::RefPtr<Gtk::IconTheme> theme, const Glib::ustring& icon_name, int size) { if (!theme || !theme->has_icon(icon_name)) // check if it exists first, or exception may be thrown. return false; std::vector<int> sizes = theme->get_icon_sizes(icon_name); for (std::vector<int>::cons...
false
false
false
false
false
0
configUINT( eFlmConfigTypes eConfigType, FLMUINT uiNumParams, const char ** ppszParams) { RCODE rc = FERR_OK; FLMUINT uiValue; char szValue [64]; // Get the value to configure. if (RC_BAD( rc = getConfigValue( eConfigType, uiNumParams, ppszParams, sizeof( szValue), szValue))) { goto ...
false
false
false
false
false
0
paintControlElementText(Style::ControlElement element, const StyleFeatures &feature, const QString &text, QPainter *painter) { switch(element) { case CE_PushButton : drawPushButtonText(feature, text, painter); break; case CE_LineEdit: drawLineEditText(feature, text, painter); break; case CE_Label: drawL...
false
false
false
false
false
0
priestini(d_level *lvl, struct mkroom *sroom, int sx, int sy, bool sanctum) { struct monst *priest; struct obj *otmp; int cnt; if(MON_AT(sx+1, sy)) { rloc(m_at(sx+1, sy), false); /* insurance */ } priest = makemon(&mons[sanctum ? PM_HIGH_PRIEST : PM_ALIGNED_PRIEST], ...
false
true
false
false
false
1
csbe_write_io_write(csbe_context *cx, Quadruple *io_start, Quadruple *io_end) { Quadruple *ioc_unit = search_ioc_qr(io_start, io_end, OPE_IOCUNIT); Quadruple *ioc_fmt = search_ioc_qr(io_start, io_end, OPE_IOCFMT); Quadruple *ioc_iostatus = search_ioc_qr(io_start, io_end, OPE_IOCIOSTAT); if (ioc_fmt != ...
false
false
false
false
false
0
ensure_text_height (GcrDisplayView *self) { PangoRectangle extents; PangoLayout *layout; if (self->pv->text_height > 0) return; layout = gtk_widget_create_pango_layout (GTK_WIDGET (self), "Wp"); pango_layout_get_extents (layout, NULL, &extents); pango_extents_to_pixels (&extents, NULL); g_object_unref (layou...
false
false
false
false
false
0
release_openowner(struct nfs4_openowner *oo) { struct nfs4_ol_stateid *stp; struct nfs4_client *clp = oo->oo_owner.so_client; struct list_head reaplist; INIT_LIST_HEAD(&reaplist); spin_lock(&clp->cl_lock); unhash_openowner_locked(oo); while (!list_empty(&oo->oo_owner.so_stateids)) { stp = list_first_entry(&o...
false
false
false
false
false
0
getElement(long level) { if (level > myLevel) { std::cerr << "Error in :" << "SkipListElement::getElement() level:"; std::cerr << level << ", my level:" << myLevel << ", max level: " << SKIPLIST_MAXLEVEL << std::endl; return(this); } else { return(myNext[level]); } }
false
false
false
false
false
0
pm80xx_get_encrypt_info(struct pm8001_hba_info *pm8001_ha) { u32 scratch3_value; int ret = -1; /* Read encryption status from SCRATCH PAD 3 */ scratch3_value = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_3); if ((scratch3_value & SCRATCH_PAD3_ENC_MASK) == SCRATCH_PAD3_ENC_READY) { if (scratch3_value & SCRA...
false
false
false
false
false
0
ppd_is_installable( ppd_group_t *installable, /* I - InstallableOptions group */ const char *name) /* I - Option name */ { if (installable) { int i; /* Looping var */ ppd_option_t *option; /* Current option */ for (i = installable->num_options, option = installable->options; i ...
false
false
false
false
false
0
procstart(const char *rootdir){ char *path; path = est_realpath(rootdir); cbglobalgc(path, free); g_rootdir = path; if(!est_init_net_env()) die("could not initialize network environment"); atexit(est_free_net_env); do { setsignals(); startup(); dispatch(); cleanup(); } while(g_sigrestart...
false
false
false
false
false
0
revertSize(bool) { double ow = modelPart()->localProp("originalWidth").toDouble(); double oh = modelPart()->localProp("originalHeight").toDouble(); InfoGraphicsView * infoGraphicsView = InfoGraphicsView::getInfoGraphicsView(this); if (infoGraphicsView != NULL) { infoGraphicsView->resizeBoard(ow, oh, tru...
false
false
false
false
false
0
numaBinSort(NUMA *nas, l_int32 sortorder) { NUMA *nat, *nad; PROCNAME("numaBinSort"); if (!nas) return (NUMA *)ERROR_PTR("nas not defined", procName, NULL); if (sortorder != L_SORT_INCREASING && sortorder != L_SORT_DECREASING) return (NUMA *)ERROR_PTR("invalid sort order",...
false
false
false
false
false
0
glade_gtk_cell_renderer_sync_attributes (GObject *object) { GtkCellLayout *layout; GtkCellRenderer *cell; GladeWidget *widget = glade_widget_get_from_gobject (object); GladeWidget *gmodel; GladeProperty *property; gchar *attr_prop_name; GList *l, *column_list = NULL; gint columns = 0; static gint attr_len = 0...
false
false
false
false
false
0
Euclidean2DFromCorrespondences2PointRobust( const Mat &x1, const Mat &x2, double max_error, Mat3 *H, vector<int> *inliers, double outliers_probability) { // The threshold is on the sum of the squared errors in the two images. double threshold = 2 * Square(max_error); double best_score = HU...
false
false
false
false
false
0
process_block_sha1(sha1 * message) { chunk x; chunk w[80]; /* test block */ chunk A; /* A - E: used for hash calc */ chunk B; chunk C; chunk D; chunk E; chunk T; /* temp guint32 */ chunk K[] = { 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62...
false
false
false
false
false
0
Cmd_CPSI_f (edict_t * ent) { if (video_check->value || video_check_lockpvs->value || video_check_glclear->value || darkmatch->value) { ent->client->resp.glmodulate = atoi(gi.argv(1)); ent->client->resp.gllockpvs = atoi(gi.argv(2)); ent->client->resp.glclear = atoi(gi.argv(3)); ent->client->resp.gldynamic = at...
false
false
false
false
true
1
qr_shift_cost(const Operand* op0, const Operand* op1, const Operand* op2) { int cost; if ((!is_integer(op0->tbl.v->type) && op0->tbl.v->type != TYPE_LOGICAL) || (!is_integer(op1->tbl.v->type) && op1->tbl.v->type != TYPE_LOGICAL) || (!i...
false
false
false
false
false
0
libmail_readheader_finish(struct read_header_context *cts) { struct header *last; for (last=cts->first; last; last=last->next) { char *q, *r; if (!last->header) continue; for (q=r=last->header; *r; r++) { if (*r == '\r') continue; *q++ = *r; } *q=0; } return (cts->first); }
false
false
false
false
false
0
tfdt_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_TFBaseMediaDecodeTimeBox *ptr = (GF_TFBaseMediaDecodeTimeBox *) s; e = gf_isom_full_box_write(s, bs); if (e) return e; if (ptr->version==1) { gf_bs_write_u64(bs, ptr->baseMediaDecodeTime); } else { gf_bs_write_u32(bs, (u32) ptr->baseMediaDecodeTime); } ...
false
false
false
false
false
0
stage_random_files(char *files[]) { char *filename; size_t i; write_files(files); for (i = 0, filename = files[i]; filename; filename = files[++i]) cl_git_pass(git_index_add_bypath(repo_index, filename)); }
false
false
false
false
false
0
font_measure_full(const RrFont *f, const gchar *str, gint *x, gint *y, gint shadow_x, gint shadow_y, gboolean flow, gint maxwidth) { PangoRectangle rect; pango_layout_set_text(f->layout, str, -1); if (flow) { pango_layout_set_single_paragr...
false
false
false
false
false
0
ahc_linux_target_alloc(struct scsi_target *starget) { struct ahc_softc *ahc = *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); struct seeprom_config *sc = ahc->seep_config; unsigned long flags; struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); unsigned short scsirate; struct ahc...
false
false
false
false
false
0
push_block (rtx size, int extra, int below) { rtx temp; size = convert_modes (Pmode, ptr_mode, size, 1); if (CONSTANT_P (size)) anti_adjust_stack (plus_constant (size, extra)); else if (REG_P (size) && extra == 0) anti_adjust_stack (size); else { temp = copy_to_mode_reg (Pmode, size); ...
false
false
false
false
false
0
do_popup_menu (GgdDoctypeSelector *self, GdkEventButton *event) { guint event_button; guint32 event_time; GtkMenuPositionFunc menu_position_func; if (event) { event_button = event->button; event_time = event->time; menu_position_func = NULL; } else {...
false
false
false
false
false
0
addBaseThemes(KIconThemeNode *node, const QString &appname) { // Quote from the icon theme specification: // The lookup is done first in the current theme, and then recursively // in each of the current theme's parents, and finally in the // default theme called "hicolor" (implementations may add ...
false
false
false
false
false
0
dnpds40_resp_cmd(struct dnpds40_ctx *ctx, struct dnpds40_cmd *cmd, int *len) { char tmp[9]; uint8_t *respbuf; int ret, i, num = 0; memset(tmp, 0, sizeof(tmp)); if ((ret = dnpds40_do_cmd(ctx, cmd, NULL, 0))) return NULL; /* Read in the response header */ ret = read_data(ctx->dev, ctx->endp_up, ...
false
false
false
false
false
0
CRC(const unsigned char *p, size_t len, unsigned short seed) { int i; while (len--) { seed ^= *p++; for (i = 0; i < 8; i++) seed = (seed >> 1) ^ ((seed & 1) ? CRCPOLY : 0); } return ~seed; }
false
false
false
false
false
0
compat_drm_infobufs(struct file *file, unsigned int cmd, unsigned long arg) { drm_buf_info32_t req32; drm_buf_info32_t __user *argp = (void __user *)arg; drm_buf_desc32_t __user *to; struct drm_buf_info __user *request; struct drm_buf_desc __user *list; size_t nbytes; int i, err; int count, actual; ...
false
false
false
false
false
0
bjoin (const struct bstrList * bl, const_bstring sep) { bstring b; int i, c, v; if (bl == NULL || bl->qty < 0) return NULL; if (sep != NULL && (sep->slen < 0 || sep->data == NULL)) return NULL; for (i = 0, c = 1; i < bl->qty; i++) { v = bl->entry[i]->slen; if (v < 0) return NULL; /* Invalid input */ ...
false
false
false
false
false
0
fdilate_1_13(l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls) { l_int32 i; register l_int32 j, pwpls; register l_uint32 *sptr, *dptr; pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src *...
false
false
false
false
false
0
OnApply() { #if defined(TRACE_ENVVARS) Manager::Get()->GetLogManager()->DebugLog(F(_T("OnApply"))); #endif wxCheckBox* checkbox_control = XRCCTRL(*this, "chkEnvvarSet", wxCheckBox); if (checkbox_control && checkbox_control->IsChecked()) { wxChoice* choice_control = XRCCTRL(*this, "choEnvvarSets", wxChoice)...
false
false
false
false
false
0
accessx_status_applet_notify_xkb_controls (AccessxStatusApplet *sapplet, XkbControlsNotifyEvent *event) { unsigned int mask = XkbStickyKeysMask | XkbSlowKeysMask | XkbBounceKeysMask | XkbMouseKeysMask; unsigned int notify_mask = 0; XkbGetControls (sapplet->xkb_display, XkbMouseKeysMask, sapplet->xkb...
false
false
false
false
false
0
lookup_read_master(struct master *master, time_t age, void *context) { struct lookup_context *ctxt = (struct lookup_context *) context; unsigned int timeout = master->default_timeout; unsigned int logging = master->default_logging; unsigned int logopt = master->logopt; char *tablename; nis_result *result; nis_o...
true
true
false
false
false
1
copy_value_list(const stp_list_t *src) { stp_list_t *ret = create_vars_list(); const stp_list_item_t *item = stp_list_get_start((const stp_list_t *)src); while (item) { stp_list_item_create(ret, NULL, value_copy(stp_list_item_get_data(item))); item = stp_list_item_next(item); } return ret; }
false
false
false
false
false
0
findMergePoint(const Game& otherGame) { MoveId prevNode = NO_MOVE; MoveId trailNode = NO_MOVE; MoveId otherMergeNode = NO_MOVE; bool found = false; do { if(NO_MOVE == (otherMergeNode = otherGame.findPosition(board()))) { if(trailNode != NO_MOVE) { ...
false
false
false
false
false
0
data_cal_complete_get_attachment_uris_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) { AsyncContext *async_context = user_data; GQueue queue = G_QUEUE_INIT; GError *error = NULL; e_cal_backend_get_attachment_...
false
false
false
false
false
0
super_fgets_w(char **b, size_t *blen, Image *file) { size_t len; int c; unsigned char *p, *q; len=*blen; p=(unsigned char *) (*b); for (q=p; ; q++) { c=ReadBlobLSBShort(file); if (c == ((unsigned short) ~0U) || c == '\n') break; if (EOFBlob(file)) break; if ((q...
false
false
false
false
false
0
liftRank2Args(as,alpha,m) List as; Int alpha; Int m; { Int i = 0; for (; i<m; i++) copyTyvar(alpha+i); for (m=nextGeneric; nonNull(as); as=tl(as)) { Type ta = arg(fun(as)); ta = isPolyType(ta) ? liftRank1Body(ta,m) : copyType(ta,alpha); arg(fun(as)) = ta; } }
false
false
false
false
false
0
jmicron_probe_slot(struct sdhci_pci_slot *slot) { if (slot->chip->pdev->revision == 0) { u16 version; version = readl(slot->host->ioaddr + SDHCI_HOST_VERSION); version = (version & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT; /* * Older versions of the chip have lots of nasty glitches * in the ...
false
false
false
false
false
0
dependent_unlink (GnmDependent *dep) { GnmDepContainer *contain; GnmEvalPos ep; g_return_if_fail (dep != NULL); g_return_if_fail (dependent_is_linked (dep)); g_return_if_fail (dep->texpr != NULL); g_return_if_fail (IS_SHEET (dep->sheet)); link_unlink_expr_dep (eval_pos_init_dep (&ep, dep), dep->texpr-...
false
false
false
false
false
0
set_table_default_charset(THD *thd, HA_CREATE_INFO *create_info, char *db) { /* If the table character set was not given explicitly, let's fetch the database default character set and apply it to the table. */ if (!create_info->default_table_charset) { HA_CREATE_INFO db_info; load...
false
false
false
false
false
0
head_sq() { register int l, r; int i, k; int numnodes; /* # of nodes in simplified tree */ outbeg = outbuf; /* * Write out a simplified decoding tree. Only the interior nodes are * written. When a child is a leaf index (representing a data value) * it is recoded as -(index + 1) to distinguish it from int...
false
false
false
false
false
0
generate_code() { if (constval) return tsprintf("%d", value); else { switch (op) { case '=': return tsprintf("(%s) == (%s)", left->generate_code(), right->generate_code()); break; case NEQ: return tsprintf("(%s) != (%s)", left->generate_cod...
false
false
false
false
false
0
main() { primes p; // also instantiates the 'soap' context p.sieve(100); // sieve primes p.write(); // write them in XML return 0; }
false
false
false
false
false
0
onCmdRequestTrack(FXObject*sender,FXSelector,void*ptr){ FXEvent* event=(FXEvent*)ptr; FXWindow*window=(FXWindow*)sender; if(event->target==GMClipboard::urilistType){ FXStringList filenames; FXIntList tracks; FXString uri; GMPlayerManager::instance()->getTrackView()->getSelectedTracks(tracks); ...
false
false
false
false
false
0
find_repository_file(const char *zRoot, const char *zBase){ char *zFile = mprintf("%s/%s,v", zRoot, zBase); if( access(zFile, 0) ){ int n; free(zFile); n = strlen(zBase); while( n>-0 && zBase[n-1]!='/' ){ n--; } if( n>0 ){ zFile = mprintf("%s/%.*s/Attic/%s,v", zRoot, n-1, zBase, &zBase[n])...
false
false
false
false
false
0
reassessAfterReorg( BlockHeaderRef* oldTopPtr, BlockHeaderRef* newTopPtr, BlockHeaderRef* branchPtr) { cout << "Reassessing Tx validity after (after reorg?)" << endl; // Walk down invalidated chain first, until ...
false
false
false
false
false
0
on_audiooutput_device_added_cb (const Ekiga::AudioOutputDevice & device, bool isDesired, GtkWidget *prefs_window) { GmPreferencesWindow *pw = NULL; g_return_if_fail (prefs_window != NULL); pw = gm_pw_get_pw (prefs_window); gnome_prefs_string_option_menu_add (pw->audio_player, (device.GetString()).c_str(), isDe...
false
false
false
false
false
0
tryAgain() { if(op != -1) return; QCA_logTextMessage(QString("sasl[%1]: c->tryAgain()").arg(q->objectName()), Logger::Information); op = OpTryAgain; c->tryAgain(); }
false
false
false
false
false
0
diff_flush(struct diff_options *options) { struct diff_queue_struct *q = &diff_queued_diff; int i, output_format = options->output_format; int separator = 0; /* * Order: raw, stat, summary, patch * or: name/name-status/checkdiff (other bits clear) */ if (!q->nr) goto free_queue; if (output_format & (...
false
false
false
false
false
0
syncevo_config_foreach_source (SyncevoConfig *config, ConfigFunc func, gpointer userdata) { GHashTableIter iter; char *key; GHashTable *value; g_hash_table_iter_init (&iter, config); while (g_hash_table_iter_next (&iter, (gpoin...
false
false
false
false
false
0
scale_positions(Field *f,float min, float max) { int i,num; Array a; float *pts; a = (Array)DXGetComponentValue((Field)*f,"positions"); if (!DXGetArrayInfo((Array)a,&num,NULL,NULL,NULL,NULL)) goto error; pts = (float *)DXGetArrayData(a); if (!pts) goto error; for (i=0; i<num; i++) ...
false
false
false
false
false
0
rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p) { struct ieee_param *param; int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); /* * this function is expect to call in master mode, which allows no power saving * so, we just check hw_init_completed */ if (!padapter->hw...
false
false
false
false
false
0
dirvote_get_pending_consensus(consensus_flavor_t flav) { tor_assert(((int)flav) >= 0 && flav < N_CONSENSUS_FLAVORS); return pending_consensuses[flav].body; }
false
false
false
false
false
0
__ecerePropertySelfWatcher_0_modifiedDocument(struct __ecereNameSpace__ecere__com__Instance * this) { struct Designer * __ecerePointer_Designer = (struct Designer *)(this ? (((char *)this) + __ecereClass_Designer->offset) : 0); __ecereProp___ecereNameSpace__ecere__gui__controls__MenuItem_Set_disabled(__ecerePointer_De...
false
false
false
false
false
0
header_complex_generate_oid(oid * name, /* out */ size_t * length, /* out */ oid * prefix, size_t prefix_len, netsnmp_variable_list * data) { oid *oidptr; netsnmp_variable_list *var; ...
false
false
false
false
true
1
rhash_aich_chunk_table_extend(aich_ctx* ctx, unsigned chunk_num) { unsigned index = (chunk_num >> CT_BITS); assert(sizeof(hash_pair_t) == 40); assert(sizeof(hash_pairs_group_t) == (40 * CT_GROUP_SIZE)); /* 10KiB */ assert(CT_GROUP_SIZE == 256); assert(CT_INDEX(chunk_num) == 0); /* check main assumptions */ asse...
false
false
false
false
false
0
_ds_shutdown_storage (DSPAM_CTX * CTX) { struct _sqlite_drv_storage *s = (struct _sqlite_drv_storage *) CTX->storage; struct nt_node *node_nt; struct nt_c c_nt; if (s->dbh == NULL) { LOGDEBUG ("_ds_shutdown_storage: invalid database handle (NULL)"); return EINVAL; } node_nt = c_nt_first (s->dir_...
false
false
false
false
false
0
decode_coeff(DCTELEM *dst, int coef, int esc, GetBitContext *gb, VLC* vlc) { if(coef){ if(coef == esc){ coef = get_vlc2(gb, vlc->table, 9, 2); if(coef > 23){ coef -= 23; coef = 22 + ((1 << coef) | get_bits(gb, coef)); } coef += ...
false
false
false
false
false
0
VoiceNameSorter(const void *p1, const void *p2) {//======================================================= int ix; espeak_VOICE *v1 = *(espeak_VOICE **)p1; espeak_VOICE *v2 = *(espeak_VOICE **)p2; if((ix = strcmp(&v1->languages[1],&v2->languages[1])) != 0) // primary language name return(ix); if((ix = v1->lan...
false
false
false
false
false
0
start() { if (pthread_create(&m_id, 0, staticRun, this)) { cerr << "ERROR: thread creation failed" << endl; exit(1); } else { #ifdef DEBUG_THREAD cerr << "THREAD DEBUG: Created thread " << m_id << " for thread object " << this << endl; #endif m_extant = true; } }
false
false
false
false
false
0
setshort_defname(short_handle h, const char* s) { mkshort_handle_imp* hdl = (mkshort_handle_imp*) h; if (s == NULL) { fatal("setshort_defname called without a valid name."); } if (hdl->defname != NULL) { xfree(hdl->defname); } hdl->defname = xstrdup(s); }
false
false
false
false
false
0
UpdateHashes(u64 offset, const void *buffer, size_t length) { // Are we already beyond the first 16k if (offset >= 16384) { contextfull.Update(buffer, length); } // Would we reach the 16k mark else if (offset+length >= 16384) { // Finish the 16k hash size_t first = (size_t)(16384-offset); ...
false
false
false
false
false
0
xhci_call_host_update_timeout_for_endpoint(struct xhci_hcd *xhci, struct usb_device *udev, struct usb_endpoint_descriptor *desc, enum usb3_link_state state, u16 *timeout) { if (state == USB3_LPM_U1) return xhci_calculate_u1_timeout(xhci, udev, desc); else if (state == USB3_LPM_U2) return xhci_calculate_u2...
false
false
false
false
false
0
pm2fb_fillrect(struct fb_info *info, const struct fb_fillrect *region) { struct pm2fb_par *par = info->par; struct fb_fillrect modded; int vxres, vyres; u32 color = (info->fix.visual == FB_VISUAL_TRUECOLOR) ? ((u32 *)info->pseudo_palette)[region->color] : region->color; if (info->state != FBINFO_STATE_RUNNI...
false
false
false
false
false
0
jpc_ppxstab_destroy(jpc_ppxstab_t *tab) { int i; for (i = 0; i < tab->numents; ++i) { jpc_ppxstabent_destroy(tab->ents[i]); } if (tab->ents) { jas_free(tab->ents); } jas_free(tab); }
false
false
false
false
false
0
cp_parser_asm_operand_list (cp_parser* parser) { tree asm_operands = NULL_TREE; bool invalid_operands = false; while (true) { tree string_literal; tree expression; tree name; if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_SQUARE)) { /* Consume the `[' token. */ cp_lexer_...
false
false
false
false
false
0
profileDyadic(A a, A w, I i) { struct tms tStart, tEnd; I typeIdx=-1, sizeIdx; I z; if( i<sizeP2 ) { if( QA(a) && a->t<=Et ) { typeIdx=(a->t!=Et) ? a->t : 3; /* Set type index */ sizeIdx=(a->n< 2 )? 1: /* Set size index */ (a->n< 10 )? 2 : (a->n< 100 )? 3 ...
false
false
false
false
false
0
CropEnd( const gnSeqI end ){ gnSeqI tmp; if(m_end > end){ tmp = end > m_start ? end : m_start; m_endLength += m_end - tmp; m_end = tmp; } if(m_start == m_end) return false; return true; }
false
false
false
false
false
0
WriteGeometryToMIFFile(MIDDATAFile *fp) { OGRGeometry *poGeom; OGRPoint *poPoint; OGRMultiPoint *poMultiPoint; int nNumPoints, iPoint; /*----------------------------------------------------------------- * Fetch and validate geometry *------------...
false
false
false
false
false
0
istgt_lu_tape_load_ctlblock(ISTGT_LU_TAPE *spec) { int64_t rc; if (istgt_lu_tape_seek(spec, 0) == -1) { return -1; } rc = istgt_lu_tape_read(spec, spec->ctlblock, CTLBLOCKLEN); if (rc < 0 || rc != CTLBLOCKLEN) { return -1; } return rc; }
false
false
false
false
false
0