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
XOTclCheckBooleanArgs(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { int result, bool; Tcl_Obj *boolean; if (objc == 2) { /* the variable is not yet defined (set), so we cannot check whether it is boolean or not */ return TCL_OK; } else if (objc != 3)...
false
false
false
false
false
0
Match_Type_get_score_macro(Match_Type type){ register gchar *macro = NULL; switch(type){ case Match_Type_DNA2DNA: macro = Match_1_1_dna_score_macro(); break; case Match_Type_PROTEIN2PROTEIN: macro = Match_1_1_protein_score_macro(); break; c...
false
false
false
false
false
0
clutter_model_filter_iter (ClutterModel *model, ClutterModelIter *iter) { ClutterModelPrivate *priv; g_return_val_if_fail (CLUTTER_IS_MODEL (model), TRUE); g_return_val_if_fail (CLUTTER_IS_MODEL_ITER (iter), TRUE); priv = model->priv; if (!priv->filter_func) return TRUE; ...
false
false
false
false
false
0
make_move(Move mov, const GameEntry::MoveAttributes & move_attr) { ASSERT(mov.is_valid(current_board)); ASSERT(mov.is_legal(current_board)); /* stop clock of side that has played the current move */ current_clock[get_side()].stop(); /* make sure we don't put any running clocks in game history */ old_clock[WHITE...
false
false
false
false
false
0
slotPercent(KJob *job, unsigned long percent) { qulonglong bytesTotal = job->totalAmount(KJob::Bytes); qulonglong bytesProcessed = bytesTotal * (percent / 100); if (operation() == QNetworkAccessManager::PutOperation || operation() == QNetworkAccessManager::PostOperation) { emit uploadProgres...
false
false
false
false
false
0
operator==(const UString& s1, const char *s2) { if (s2 == 0) { return s1.isEmpty(); } const UChar *u = s1.data(); const UChar *uend = u + s1.size(); while (u != uend && *s2) { if (u->uc != (unsigned char)*s2) return false; s2++; u++; } return u == uend && *s2 == 0; }
false
false
false
false
false
0
guess_extract_qk(const struct gnutella_node *n, const gnet_host_t *h) { int i; node_check(n); g_assert(GTA_MSG_INIT_RESPONSE == gnutella_header_get_function(&n->header)); g_assert(h != NULL); for (i = 0; i < n->extcount; i++) { const extvec_t *e = &n->extvec[i]; switch (e->ext_token) { case EXT_T_GGEP_QK:...
false
false
false
false
false
0
initDataBase(const char * filename, sqlite3 ** db) { //int rc = sqlite3_open_v2(filename, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); int rc = sqlite3_open(filename, &(*db)); if (rc != SQLITE_OK) { sql_error(*db); sqlite3_close(*db); // May be usefull later return rc; } sql_exec(*db, "create...
false
false
false
false
false
0
p7_oprofile_ReadBlockMSV(P7_HMMFILE *hfp, ESL_ALPHABET **byp_abc, P7_OM_BLOCK *hmmBlock) { int i; int size = 0; int status = eslOK; hmmBlock->count = 0; for (i = 0; i < hmmBlock->listSize; ++i) { status = p7_oprofile_ReadMSV(hfp, byp_abc, &hmmBlock->list[i]); if (status != eslOK) ...
false
false
false
false
false
0
probe_matroska(bgav_input_context_t * input) { bgav_mkv_ebml_header_t h; bgav_input_context_t * input_mem; int ret = 0; /* We want a complete EBML header in the first 64 bits * with DocType either "matroska" or "webm" */ uint8_t header[64]; if(bgav_input_get_data(input, header, 64) < 64) r...
false
false
false
false
false
0
channel_process_input () { static char linebuf[4096]; char *linep = linebuf; char *line; int bytes_read; #if GLIB_MAJOR_VERSION > 1 // we need to call this again because we will get new events before returning // from this function // semantics of add_watch silently changing between glib versions!!!! g_io_add_w...
true
true
false
false
false
1
fixup_free_space(struct ubifs_info *c) { int lnum, err = 0; struct ubifs_lprops *lprops; ubifs_get_lprops(c); /* Fixup LEBs in the master area */ for (lnum = UBIFS_MST_LNUM; lnum < UBIFS_LOG_LNUM; lnum++) { err = fixup_leb(c, lnum, c->mst_offs + c->mst_node_alsz); if (err) goto out; } /* Unmap unused l...
false
false
false
false
false
0
cplus_demangle (const char *mangled, int options) { char *ret; struct work_stuff work[1]; if (current_demangling_style == no_demangling) return xstrdup (mangled); memset ((char *) work, 0, sizeof (work)); work->options = options; if ((work->options & DMGL_STYLE_MASK) == 0) work->options |= (int) c...
false
false
false
false
false
0
IoBlowfish_endProcessing(IoBlowfish *self, IoObject *locals, IoMessage *m) { /*doc Blowfish endProcessing Finish processing remaining bytes of inputBuffer. */ blowfish_ctx *context = &(DATA(self)->context); unsigned long lr[2]; IoBlowfish_process(self, locals, m); // process the full blocks first { int isE...
false
false
false
false
false
0
_destroy_zend_class_traits_info(zend_class_entry *ce) { if (ce->num_traits > 0 && ce->traits) { efree(ce->traits); } if (ce->trait_aliases) { size_t i = 0; while (ce->trait_aliases[i]) { if (ce->trait_aliases[i]->trait_method) { if (ce->trait_aliases[i]->trait_method->method_name) { efree((char*...
false
false
false
false
false
0
initDialog() { setInnerType(true, toqstr("minipage")); widthED->setText("100"); widthUnitsLC->setCurrentItem(Length::PCW); heightED->setText("1"); heightUnitsLC->setCurrentItem("totalheight"); }
false
false
false
false
false
0
InsertHelp(int e, BNode *&n) { #ifdef DEBUG cout << "InsertHelp got " << e << endl; #endif BNode * next; if (e < n->data) { next = n->left; // check left side } else { next = n->right; // Check right side } if (next == NULL) { // Creating a New node BNode * nn = new BNode(e...
false
false
false
false
false
0
gt_translator_find_stopcodon(GtTranslator *translator, unsigned long *pos, GtError *err) { char n1, n2, n3; unsigned int frame; GtCodonIteratorStatus retval; gt_assert(translator && pos); gt_error_check(err); wh...
false
false
false
false
false
0
getNumerusInfo(QLocale::Language language, QLocale::Country country, QStringList *forms) { forever { for (int i = 0; i < NumerusTableSize; ++i) { const NumerusTableEntry &entry = numerusTable[i]; for (int j = 0; entry.languages[j] != EOL; ++j) { ...
false
false
false
false
false
0
ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos, size_t count) { int ret = 0; unsigned int extent_flags; u32 cpos, clusters, extent_len, phys_cpos; struct super_block *sb = inode->i_sb; if (!ocfs2_refcount_tree(OCFS2_SB(inode->i_sb)) || !(OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFC...
false
false
false
false
false
0
NER_ArgumentSet_create(Argument *arg){ register ArgumentSet *as; static NER_ArgumentSet nas; if(arg){ as = ArgumentSet_create("NER Model Options"); ArgumentSet_add_option(as, 0, "minner", "length", "Minimum NER length", "10", Argument_parse_int, &nas.min_ner); A...
false
false
false
false
false
0
iconv_readlink(const char *path, char *buf, size_t size) { struct iconv *ic = iconv_get(); char *newpath; int err = iconv_convpath(ic, path, &newpath, 0); if (!err) { err = fuse_fs_readlink(ic->next, newpath, buf, size); if (!err) { char *newlink; err = iconv_convpath(ic, buf, &newlink, 1); if (!err) {...
false
true
false
false
false
1
exposeEvent(XExposeEvent &event) { Icon *exposed_icon = findIcon( event.window ); if (exposed_icon != 0) exposed_icon->update(); }
false
false
false
false
false
0
setMeshSizes(const OsiSolverInterface * solver, double x, double y) { xMeshSize_ = x; yMeshSize_ = y; double xB[2]; double yB[2]; const double * lower = solver->getColLower(); const double * upper = solver->getColUpper(); xB[0] = lower[xColumn_]; xB[1] = upper[xColumn_]; yB[0] = lowe...
false
false
false
false
false
0
ensExternaldatabaseTypeToChar(EnsEExternaldatabaseType edbt) { register EnsEExternaldatabaseType i = ensEExternaldatabaseTypeNULL; for (i = ensEExternaldatabaseTypeNULL; externaldatabaseKType[i] && (i < edbt); i++); if (!externaldatabaseKType[i]) ajDebug("ensExternaldatabaseTypeT...
false
false
false
false
false
0
Scm_ReadError(ScmPort *port, const char *msg, ...) { ScmObj ostr = Scm_MakeOutputStringPort(TRUE); ScmObj name = Scm_PortName(port); ScmObj rerr; int line = Scm_PortLine(port); va_list ap; Scm_Printf(SCM_PORT(ostr), "Read error at %S:", SCM_STRINGP(name)? name : SCM_OBJ(SCM_MAKE_...
false
false
false
false
false
0
refreshPageList () { WindowManager& winMgr = WindowManager::getSingleton (); // Check if the windows exists Listbox *lbox = NULL; TabControl *tc = NULL; if (winMgr.isWindowPresent("TabControlDemo/Page1/PageList")) { lbox = static_cast<Listbox *> (winMgr.ge...
false
false
false
false
false
0
bus_component_factory_destroy_cb (BusFactoryProxy *factory, BusComponent *component) { g_return_if_fail (component->factory == factory); g_object_unref (component->factory); component->factory = NULL; /* emit the "notify" signal for the factory property on component...
false
false
false
false
false
0
key_press (XEvent *ev) { rp_screen *s; unsigned int modifier; KeySym ks; if (rp_have_xinerama) s = current_screen(); else s = find_screen (ev->xkey.root); if (!s) return; #ifdef HIDE_MOUSE XWarpPointer (dpy, None, s->root, 0, 0, 0, 0, s->left + s->width - 2, s->top + s->height - 2); #endif m...
false
false
false
false
false
0
gen9_init_perctx_bb(struct intel_engine_cs *ring, struct i915_wa_ctx_bb *wa_ctx, uint32_t *const batch, uint32_t *offset) { struct drm_device *dev = ring->dev; uint32_t index = wa_ctx_start(wa_ctx, *offset, CACHELINE_DWORDS); /* WaSetDisablePixMaskCammingAndRhwoInCommonSliceChicken:skl...
false
false
false
false
false
0
main (int argc, char *argv []) { const char *file_name = NULL; PdfInspector *inspector; gtk_init (&argc, &argv); globalParams = new GlobalParams(); globalParams->setProfileCommands (true); globalParams->setPrintCommands (true); if (argc == 2) file_name = argv[1]; else if (argc > 2) { ...
false
false
false
false
false
0
enable_midi_irq(struct snd_ice1712 *ice, u8 flag, int enable) { u8 mask = inb(ICEREG1724(ice, IRQMASK)); if (enable) mask &= ~flag; else mask |= flag; outb(mask, ICEREG1724(ice, IRQMASK)); }
false
false
false
false
false
0
vlan_destroy ( struct net_device *netdev ) { struct vlan_device *vlan = netdev->priv; struct net_device *trunk; /* Sanity check */ if ( netdev->op != &vlan_operations ) { DBGC ( netdev, "VLAN %s cannot destroy non-VLAN device\n", netdev->name ); return -ENOTTY; } DBGC ( netdev, "VLAN %s destroyed\n...
false
false
false
false
false
0
sentinelCallClientReconfScript(sentinelRedisInstance *master, int role, char *state, sentinelAddr *from, sentinelAddr *to) { char fromport[32], toport[32]; if (master->client_reconfig_script == NULL) return; ll2string(fromport,sizeof(fromport),from->port); ll2string(toport,sizeof(toport),to->port); ...
false
false
false
false
false
0
pidmap_init(void) { /* Veryify no one has done anything silly */ BUILD_BUG_ON(PID_MAX_LIMIT >= PIDNS_HASH_ADDING); /* bump default and minimum pid_max based on number of cpus */ pid_max = min(pid_max_max, max_t(int, pid_max, PIDS_PER_CPU_DEFAULT * num_possible_cpus())); pid_max_min = max_t(int, pid_max_min, ...
false
false
false
false
false
0
get_default_zoom_level (void) { NautilusZoomLevel default_zoom_level; default_zoom_level = g_settings_get_enum (nautilus_list_view_preferences, NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL); if (default_zoom_level < NAUTILUS_ZOOM_LEVEL_SMALLEST || NAUTILUS_ZOOM_LEVEL_LARGEST < default_zoom_level...
false
false
false
false
false
0
HTTP_Send(const serverinfo & s, const char *ip, short port, playerscore *scores, bool teamplay) { http_targets_t::const_iterator c, e; for (c = http_targets.begin(), e = http_targets.end(); c != e; c++) { HTTP_SendOne(s, ip, port, scores, teamplay, c->host.c_str(), c->port, c->script.c_str()); } }
false
false
false
false
false
0
setKey(const UINT8* key,bool bEncrypt) { if(bEncrypt) AES_set_encrypt_key(key,128,m_keyAES); else AES_set_decrypt_key(key,128,m_keyAES); memset(m_iv1,0,16); memset(m_iv2,0,16); m_bKeySet=true; return E_SUCCESS; }
false
false
false
false
false
0
_outMergeAppend(StringInfo str, MergeAppend *node) { int i; WRITE_NODE_TYPE("MERGEAPPEND"); _outPlanInfo(str, (Plan *) node); WRITE_NODE_FIELD(mergeplans); WRITE_INT_FIELD(numCols); appendStringInfo(str, " :sortColIdx"); for (i = 0; i < node->numCols; i++) appendStringInfo(str, " %d", node->sortColIdx[i...
false
false
false
false
false
0
addRideData(double BS, QDateTime rideDate) { int daysIndex = startDate.daysTo(rideDate); // fill in any missing days before today int d; for (d = lastDaysIndex + 1; d < daysIndex ; d++) { list[d] = 0.0; // no ride calculate(d); } // ignore stuff from before start date if(day...
false
false
false
false
false
0
decodeKeyDBGlobalSalt(DBT *saltData) { SECItem *saltitem; saltitem = (SECItem *)PORT_ZAlloc(sizeof(SECItem)); if ( saltitem == NULL ) { return(NULL); } saltitem->data = (unsigned char *)PORT_ZAlloc(saltData->size); if ( saltitem->data == NULL ) { PORT_Free(saltitem); return(NULL); ...
false
false
false
false
false
0
snd_es1968_pcm_stop(struct es1968 *chip, struct esschan *es) { spin_lock(&chip->reg_lock); snd_es1968_trigger_apu(chip, es->apu[0], 0); snd_es1968_trigger_apu(chip, es->apu[1], 0); if (es->mode == ESM_MODE_CAPTURE) { snd_es1968_trigger_apu(chip, es->apu[2], 0); snd_es1968_trigger_apu(chip, es->apu[3], 0); } s...
false
false
false
false
false
0
transformSelectStmt(ParseState *pstate, SelectStmt *stmt) { Query *qry = makeNode(Query); Node *qual; ListCell *l; qry->commandType = CMD_SELECT; /* make FOR UPDATE/FOR SHARE info available to addRangeTableEntry */ pstate->p_locking_clause = stmt->lockingClause; /* process the FROM clause */ transfor...
false
false
false
false
false
0
sc_create(struct platform_device *pdev) { struct sc_data *sc; dev_dbg(&pdev->dev, "sc_create\n"); sc = devm_kzalloc(&pdev->dev, sizeof(*sc), GFP_KERNEL); if (!sc) { dev_err(&pdev->dev, "couldn't alloc sc_data\n"); return ERR_PTR(-ENOMEM); } sc->pdev = pdev; sc->res = platform_get_resource_byname(pdev, IO...
false
false
false
false
false
0
Float_compareTo(kRawPtr *o, kRawPtr *o2) { kfloat_t f = ((kNumber*)o)->n.fvalue; kfloat_t f2 = ((kNumber*)o2)->n.fvalue; return (f < f2) ? -1 : ((f == f2) ? 0 : 1); }
false
false
false
false
false
0
hasFeature( const DOMString &feature, const DOMString &version ) { if (!impl) return false; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR); return impl->hasFeature(feature,version); }
false
false
false
false
false
0
smf_get_tempo_by_seconds(const smf_t *smf, double seconds) { size_t i; smf_tempo_t *tempo; assert(seconds >= 0.0); if (seconds == 0.0) return (smf_get_tempo_by_number(smf, 0)); assert(smf->tempo_array != NULL); for (i = smf->tempo_array->len; i > 0; i--) { tempo = smf_get_tempo_by_number(smf, i - 1); ...
false
false
false
false
false
0
nau8825_interrupt(int irq, void *data) { struct nau8825 *nau8825 = (struct nau8825 *)data; struct regmap *regmap = nau8825->regmap; int active_irq, clear_irq = 0, event = 0, event_mask = 0; regmap_read(regmap, NAU8825_REG_IRQ_STATUS, &active_irq); if ((active_irq & NAU8825_JACK_EJECTION_IRQ_MASK) == NAU8825_JA...
false
false
false
false
false
0
sierra_next_section() { int i,j; for (i=0; i<16; i++) track[i].on=0; midiprintf("\n\nnext adv sierra section:\n"); pos=sierra_pos; i=0;j=0; while (i!=0xff) { getnext(1); curtrack=j; j++; track[curtrack].on=1; track[curtrack].spos = getnext(1); track...
false
false
false
false
false
0
test_config_read__simple_read(void) { git_config *cfg; int32_t i; cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config0"))); cl_git_pass(git_config_get_int32(&i, cfg, "core.repositoryformatversion")); cl_assert(i == 0); cl_git_pass(git_config_get_bool(&i, cfg, "core.filemode")); cl_assert(i == 1)...
false
false
false
false
false
0
multi_oo_process_all(net_player *pl) { ubyte data[MAX_PACKET_SIZE]; ubyte data_add[MAX_PACKET_SIZE]; ubyte stop; int add_size; int packet_size = 0; int idx; object *moveup; // if the player has an invalid objnum.. if(pl->m_player->objnum < 0){ return; } object *targ_obj; // build the list of ship...
false
false
false
false
false
0
_pullMiscParmCheck(pullContext *pctx) { static const char me[]="_pullMiscParmCheck"; double denr; if (!( AIR_IN_CL(1, pctx->threadNum, PULL_THREAD_MAXNUM) )) { biffAddf(PULL, "%s: pctx->threadNum (%d) outside valid range [1,%d]", me, pctx->threadNum, PULL_THREAD_MAXNUM); return 1; } if (...
false
false
false
false
false
0
_remove_stale_index (xlator_t *this, xlator_t *readdir_xl, loc_t *parent, char *fname) { int ret = 0; loc_t index_loc = {0}; ret = _build_index_loc (this, &index_loc, fname, parent); if (ret) goto out; gf_log (this->na...
false
false
false
false
false
0
list_all_sources (void) { GHashTable *grouped; GList *plugins; GList *plugins_iter; GList *sources; GList *sources_for_plugin; GList *sources_iter; GrlPlugin *plugin; GrlSource *source; const gchar *plugin_id; const gchar *source_id; sources = grl_registry_get_sources (registry, FALSE); /* Gro...
false
false
false
false
false
0
on_btnOK_clicked() { canceled = false; date = dateTimeEdit->dateTime(); accept(); }
false
false
false
false
false
0
dict_index_copy_rec_order_prefix( /*=============================*/ const dict_index_t* index, /*!< in: index */ const rec_t* rec, /*!< in: record for which to copy prefix */ ulint* n_fields,/*!< out: number of fields copied */ byte** buf, /*!< in/out: memory buffer for the copied prefix, or NULL */ ...
false
false
false
false
false
0
var_redir_str(value, value_len) char_u *value; int value_len; { int len; if (redir_lval == NULL) return; if (value_len == -1) len = (int)STRLEN(value); /* Append the entire string */ else len = value_len; /* Append only "value_len" characters */ if (ga_grow(&redir_ga, len) == OK) ...
false
false
false
false
false
0
butEnv_setColor(ButEnv *env, int colornum, ButColor color) { int i; Display *dpy = env->dpy; Colormap cmap; XColor temp; static uchar bm1616[] = {1}; Window rootwin = DefaultRootWindow(dpy); if (colornum >= env->numColors) { ulong *newcolors; Pixmap *newpixmaps; newcolors = (ul...
false
false
false
false
false
0
math_factorial(PyObject *self, PyObject *arg) { long x; PyObject *result, *odd_part, *two_valuation; if (PyFloat_Check(arg)) { PyObject *lx; double dx = PyFloat_AS_DOUBLE((PyFloatObject *)arg); if (!(Py_IS_FINITE(dx) && dx == floor(dx))) { PyErr_SetString(PyExc_ValueErro...
false
false
false
false
false
0
supportedSOPClassUIDs(OFList<OFString> suppSOPs) { suppSOPs.push_back(UID_MultiframeSingleBitSecondaryCaptureImageStorage); suppSOPs.push_back(UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage); suppSOPs.push_back(UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage); suppSOPs.push_back(UID_MultiframeT...
false
false
false
false
false
0
us_osc_multisender_can_send( us_osc_sender_t *self_ ) { bool r = false; us_osc_multisender_t *self = (us_osc_multisender_t *)self_; us_osc_multisender_item_t *item = self->m_first_item; if ( item ) { /* only report that we can send if we have one or more senders */ r = true; } ...
false
false
false
false
false
0
vm_class_is_anonymous(const struct vm_class *vmc) { if (!vm_class_is_regular_class(vmc)) return false; if (vm_class_is_abstract(vmc)) return false; char *separator = strchr(vmc->name, '$'); if (!separator) return false; size_t len = strlen(separator); if (len == 0) return false; return is_numeric(sep...
false
false
false
false
false
0
getDouble() const { static char gDecimal = 0; char decimalSeparator; { Mutex mutex; if (fHave == kDouble) { return fUnion.fDouble; } else if(fHave == kInt64) { return (double)fUnion.fInt64; } decimalSeparator = gDecimal; } if (decimalS...
false
false
false
false
false
0
hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str) { struct super_block *sb = dentry->d_sb; const char *astr; const u16 *dstr; int casefold, decompose, size, len; unsigned long hash; wchar_t c; u16 c2; casefold = test_bit(HFSPLUS_SB_CASEFOLD, &HFSPLUS_SB(sb)->flags); decompose = !test_bit(HFSP...
false
false
false
false
true
1
send_signal(int sig) { GtkTreeIter iter; if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { char *pid; gtk_tree_model_get(model, &iter, THREAD_PID, &pid, -1); if (kill(atoi(pid), sig) == -1) show_errno("kill(pid)"); g_free(pid); } else plugin_beep(); }
false
false
false
false
true
1
RDF_NodeElementList ( XMP_Node * xmpParent, const XML_Node & xmlParent, bool isTopLevel ) { XMP_Assert ( isTopLevel ); XML_cNodePos currChild = xmlParent.content.begin(); // *** Change these loops to the indexed pattern. XML_cNodePos endChild = xmlParent.content.end(); for ( ; currChild != endChild; ++currChild...
false
false
false
false
false
0
data_grow_for(struct data d, int xlen) { struct data nd; int newsize; if (xlen == 0) return d; nd = d; newsize = xlen; while ((d.len + xlen) > newsize) newsize *= 2; nd.val = xrealloc(d.val, newsize); return nd; }
false
false
false
false
false
0
nautilus_event_get_window_open_flags (void) { NautilusWindowOpenFlags flags = 0; GdkEvent *event; event = gtk_get_current_event (); if (event == NULL) { return flags; } if ((event->type == GDK_BUTTON_PRESS || event->type == GDK_BUTTON_RELEASE) && (event->button.button == 2)) { flags |= NAUTILUS_WINDOW...
false
false
false
false
false
0
xsltText(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED, xmlNodePtr inst, xsltStylePreCompPtr comp ATTRIBUTE_UNUSED) { if ((inst->children != NULL) && (comp != NULL)) { xmlNodePtr text = inst->children; xmlNodePtr copy; while (text != NULL) { if ((text->type != XML_TEXT_NODE) && ...
false
false
false
false
false
0
nexttodoor(sx,sy) register int sx, sy; { register int dx, dy; register struct rm *lev; for(dx = -1; dx <= 1; dx++) for(dy = -1; dy <= 1; dy++) { if(!isok(sx+dx, sy+dy)) continue; if(IS_DOOR((lev = &levl[sx+dx][sy+dy])->typ) || lev->typ == SDOOR) return(TRUE); } return(FALSE); }
false
false
false
false
false
0
stubForUid( const QString &uid ) { // get best appPresence AppPresenceCurrent ap = d->presence_map[ uid ].best(); // look up the presence string from that app return m_im_client_stubs.value( ap.appId ); }
false
false
false
false
false
0
xmlSecNssNodeGetBigNumValue(PRArenaPool *arena, const xmlNodePtr cur, SECItem *a) { xmlSecBuffer buf; int ret; SECItem *rv; int len; xmlSecAssert2(arena != NULL, NULL); xmlSecAssert2(cur != NULL, NULL); ret = xmlSecBufferInitialize(&buf, 128); if(ret < 0) { xmlSecError(XMLSEC_...
false
false
false
false
false
0
setupTopol (int maxtips, int nsites) { /* setupTopol */ topol *tpl; if (! (tpl = (topol *) Malloc(sizeof(topol))) || ! (tpl->links = (connptr) Malloc((2*maxtips-3) * sizeof(connect))) || (nsites && ! (tpl->log_f = (double *) Malloc(nsites * sizeof(double))))) { print...
false
false
false
false
false
0
matching_rule_use_init( void ) { MatchingRule *mr; MatchingRuleUse **mru_ptr = &LDAP_SLIST_FIRST(&mru_list); Debug( LDAP_DEBUG_TRACE, "matching_rule_use_init\n", 0, 0, 0 ); LDAP_SLIST_FOREACH( mr, &mr_list, smr_next ) { AttributeType *at; MatchingRuleUse mru_storage = {{ 0 }}, *mru = &mru_storage; char...
false
false
false
false
false
0
sleepState(int mode) { #ifdef USE_APMD switch (mode) { case SUSPEND: error = system("apm -s"); break; case STANDBY: error = system("apm -S"); break; default: error = 0; break; } #else int fd; int error; if ( (fd = apm_open()) < 0...
false
false
false
false
false
0
main_window_shrink_window_when_unmaximized (MainWindow* self) { g_return_if_fail (self != NULL); g_signal_connect_object ((GtkWidget*) self, "window-state-event", (GCallback) ___lambda132__gtk_widget_window_state_event, self, 0); }
false
false
false
false
false
0
smi_recv_tasklet(unsigned long val) { unsigned long flags = 0; /* keep us warning-free. */ ipmi_smi_t intf = (ipmi_smi_t) val; int run_to_completion = intf->run_to_completion; struct ipmi_smi_msg *newmsg = NULL; /* * Start the next message if available. * * Do this here, not in the actual receiver, because ...
false
false
false
false
false
0
listTypeToString (ListTypes which) { int x; for (x = 0; listTypeList[x].which != which && listTypeList[x].name != NULL; x++) { /* Empty */ } return listTypeList[x].name; }
false
false
false
false
false
0
prune_unused_types (void) { unsigned int i; limbo_die_node *node; comdat_type_node *ctnode; pubname_ref pub; dcall_entry *dcall; #if ENABLE_ASSERT_CHECKING /* All the marks should already be clear. */ verify_marks_clear (comp_unit_die ()); for (node = limbo_die_list; node; node = node->next) verif...
false
false
false
false
false
0
genTraceOut(Junction *q) #else static void genTraceOut(q) Junction *q; #endif { if ( TraceGen ) { if ( GenCC ) {gen1("zzTRACEOUT(\"%s\");\n", q->rname);} else gen1("zzTRACEOUT((ANTLRChar *)\"%s\");\n", q->rname); } }
false
false
false
false
false
0
swapLeafNodes(int i,int splitIndex) { if (m_useQuantization) { btQuantizedBvhNode tmp = m_quantizedLeafNodes[i]; m_quantizedLeafNodes[i] = m_quantizedLeafNodes[splitIndex]; m_quantizedLeafNodes[splitIndex] = tmp; } else { btOptimizedBvhNode tmp = m_leafNodes[i]; m_leafNodes[i] = m_leafNodes[splitInde...
false
false
false
false
false
0
detachRenderTarget( const String &name ) { RenderTargetMap::iterator it = mRenderTargets.find( name ); RenderTarget *ret = NULL; if( it != mRenderTargets.end() ) { ret = it->second; /* Remove the render target from the priority groups. */ ...
false
false
false
false
false
0
modehdlc(struct BCState *bcs, int mode, int bc) { struct IsdnCardState *cs = bcs->cs; int hdlc = bcs->channel; if (cs->debug & L1_DEB_HSCX) debugl1(cs, "hdlc %c mode %d --> %d ichan %d --> %d", 'A' + hdlc, bcs->mode, mode, hdlc, bc); bcs->hw.hdlc.ctrl.ctrl = 0; switch (mode) { case (-1): /* used for init */...
false
true
false
false
false
1
grl_registry_register_source (GrlRegistry *registry, GrlPlugin *plugin, GrlSource *source, GError **error) { gchar *id; g_return_val_if_fail (GRL_IS_REGISTRY (registry), FALSE); g_return_val_if_fail (GRL_IS_PLUGIN (plugin),...
false
false
false
false
false
0
maybe_read_dollar_number (int *status, const char **format, int dollar_needed, tree params, tree *param_ptr, const format_kind_info *fki) { int argnum; int overflow_flag; const char *fcp = *format; if (! ISDIGIT (*fcp)) { if (dollar_needed) { status_warning (status, "missing $ operand nu...
false
false
false
false
false
0
OnEvent(const SEvent& event) { if (!device) return false; if (event.EventType == EET_KEY_INPUT_EVENT && event.KeyInput.Key == KEY_ESCAPE && event.KeyInput.PressedDown == false) { // user wants to quit. if (currentScene < 3) timeForThisScene = 0; else device->closeDevice(); } else ...
false
false
false
false
false
0
trySimpleShrink( // try a simple shrink ANNpointArray pa, // point array ANNidxArray pidx, // point indices to store in subtree int n, // number of points int dim, // dimension of space const ANNorthRect &bnd_box, // current bounding box ANNorthRect &inner_box) // inner box if shrinkin...
false
false
false
false
false
0
getdouble(graph_t * g, char *name, double *result) { char *p; double f; if ((p = agget(g, name))) { if (sscanf(p, "%lf", &f) >= 1) *result = f; } }
false
false
false
false
false
0
generic_confirm_dialog (const char *msg) { GtkWidget *dialog; gint r; dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, ...
false
false
false
false
false
0
check_one_component(const mca_base_component_t *component, mca_atomic_base_module_1_0_0_t **module) { int err; int priority = -1; err = query(component, &priority, module); if (OSHMEM_SUCCESS == err) { priority = (priority < 100) ? priority : 100; ATOMIC_...
false
false
false
false
false
0
scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data UNUSED) { int button; int_u vim_modifiers; if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget)) gtk_widget_grab_focus(widget); switch (event->direction) { case GDK_SCROLL_UP: button = MOUSE_4; br...
false
false
false
false
false
0
vfio_cap_len(struct vfio_pci_device *vdev, u8 cap, u8 pos) { struct pci_dev *pdev = vdev->pdev; u32 dword; u16 word; u8 byte; int ret; switch (cap) { case PCI_CAP_ID_MSI: return vfio_msi_cap_len(vdev, pos); case PCI_CAP_ID_PCIX: ret = pci_read_config_word(pdev, pos + PCI_X_CMD, &word); if (ret) return...
false
false
false
false
false
0
volgen_graph_add_nolink (volgen_graph_t *graph, const char *type, const char *format, ...) { va_list arg; xlator_t *xl = NULL; va_start (arg, format); xl = xlator_instantiate_va (type, format, arg); va_end (arg); if (!xl) return ...
false
false
false
false
false
0
idna_to_unicode_8zlz (const char *input, char **output, int flags) { char *utf8; int rc; rc = idna_to_unicode_8z8z (input, &utf8, flags); *output = stringprep_utf8_to_locale (utf8); free (utf8); if (!*output) return IDNA_ICONV_ERROR; return rc; }
false
false
false
false
false
0
glusterd_set_marker_gsync (glusterd_volinfo_t *volinfo) { int ret = -1; int marker_set = _gf_false; char *gsync_status = NULL; GF_ASSERT (THIS); GF_ASSERT (THIS->private); marker_set = glusterd_volinfo_get...
false
false
false
false
false
0
string_substring (const gchar* self, glong offset, glong len) { gchar* result = NULL; glong string_length = 0L; gboolean _tmp0_ = FALSE; glong _tmp1_ = 0L; gboolean _tmp3_ = FALSE; glong _tmp9_ = 0L; glong _tmp15_ = 0L; glong _tmp18_ = 0L; glong _tmp19_ = 0L; glong _tmp20_ = 0L; glong _tmp21_ = 0L; glong _t...
false
false
false
false
false
0
palette_lookup(Palette *palette, uint8_t r, uint8_t g, uint8_t b) { PaletteColor color = { r, g, b, 0 }; PaletteColor *real_color = hmap_get(palette->map, &color); return (real_color != NULL ? real_color->index : -1); }
false
false
false
false
false
0
archive_access_plain (struct znode *zn) { struct zfile *z; if (zn->offset) { struct zfile *zf; z = zfile_fopen_empty (zn->volume->archive, zn->fullname, zn->size); zf = zfile_fopen (zfile_getname (zn->volume->archive), _T("rb"), zn->volume->archive->zfdmask & ~ZFD_ADF, zn->offset - 1); if (zf) { zfile_fre...
false
false
false
false
false
0
init_active_labels(struct nd_region *nd_region) { int i; for (i = 0; i < nd_region->ndr_mappings; i++) { struct nd_mapping *nd_mapping = &nd_region->mapping[i]; struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); struct nvdimm *nvdimm = nd_mapping->nvdimm; int count, j; /* * If the dimm is disabled then p...
false
false
false
false
false
0
bar_set_top_row (GnmPane *pane, int new_first_row) { GocCanvas *rowc; gint64 row_offset; row_offset = pane->first_offset.y += scg_colrow_distance_get (pane->simple.scg, FALSE, pane->first.row, new_first_row); pane->first.row = new_first_row; /* Scroll the row headers */ if (NULL != (rowc = pane->row.canvas)) ...
false
false
false
false
false
0