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
FillEmptyTiles() { toff_t *panByteCounts = NULL; int nBlockCount, iBlock; if (!SetDirectory()) return; /* -------------------------------------------------------------------- */ /* How many blocks are there in this file? */ /* --------------------------------------...
false
false
false
false
false
0
xml_unescape_str(gchar *str) { gchar *start; gchar *end; gchar *p = str; gchar *esc_str; gchar ch; gint len; while ((start = strchr(p, '&')) != NULL) { if ((end = strchr(start + 1, ';')) == NULL) { g_warning("Unescaped '&' appeared\n"); p = start + 1; continue; } len = end - start + 1; if (len ...
false
false
false
false
false
0
try_combine_classifiers(RouterT *router, ElementT *classifier) { ElementClassT *classifier_t = ElementClassT::base_type("Classifier"); if (classifier->type() != classifier_t) // cannot combine IPClassifiers yet return false; Vector<PortT> branches; router->find_connections_to(PortT(classifier, 0), bran...
false
false
false
false
false
0
prodigy192_add_controls(struct snd_ice1712 *ice) { struct prodigy192_spec *spec = ice->spec; unsigned int i; int err; for (i = 0; i < ARRAY_SIZE(stac_controls); i++) { err = snd_ctl_add(ice->card, snd_ctl_new1(&stac_controls[i], ice)); if (err < 0) return err; } if (spec->ak4114) { /* ak4114 is co...
false
false
false
false
false
0
bifcar(bifcxdef *ctx, int argc) { uchar *lstp; uint lstsiz; runsdef val; bifcntargs(ctx, 1, argc); bifchkarg(ctx, DAT_LIST); lstp = runpoplst(ctx->bifcxrun); /* get list's size, and point to its data string */ lstsiz = osrp2(lstp) - 2; lstp += 2; ...
false
false
false
true
false
1
x509_hash_find(u_int8_t *id, size_t len) { struct x509_hash *cert; u_int8_t **cid; u_int32_t *clen; int n, i, id_found; for (cert = LIST_FIRST(&x509_tab[x509_hash(id, len)]); cert; cert = LIST_NEXT(cert, link)) { if (!x509_cert_get_subjects(cert->cert, &n, &cid, &clen)) continue; id_found = 0; for ...
false
false
false
false
true
1
varcmp(const char *p, const char *q) { int c, d; while ((c = *p) == (d = *q)) { if (!c || c == '=') goto out; p++; q++; } if (c == '=') c = 0; if (d == '=') d = 0; out: return c - d; }
false
false
false
false
false
0
addNewChain(const QString &identifier) { return m_chains.insert(identifier, DesktopChain(m_maxChainSize)); }
false
false
false
false
false
0
process_command(HSCPRJ * project, LONG command, DLLIST * arglist) { BOOL ok = TRUE; DLNODE *nd = NULL; D(fprintf(stderr, DHP "process_command()\n")); D(fprintf(stderr, DHP "command: %s\n", command_name[command])); /* count number of args */ if (arglist) nd = dll_first(arglist); if ...
false
false
false
false
true
1
hpfs_hash_dentry(const struct dentry *dentry, struct qstr *qstr) { unsigned long hash; int i; unsigned l = qstr->len; if (l == 1) if (qstr->name[0]=='.') goto x; if (l == 2) if (qstr->name[0]=='.' || qstr->name[1]=='.') goto x; hpfs_adjust_length(qstr->name, &l); /*if (hpfs_chk_name(qstr->name,&l))*/ /*ret...
false
false
false
false
false
0
call_usermodehelper_keys(char *path, char **argv, char **envp, struct key *session_keyring, int wait) { struct subprocess_info *info; info = call_usermodehelper_setup(path, argv, envp, GFP_KERNEL, umh_keys_init, umh_keys_cleanup, session_keyring); if (!info) return -ENOMEM; key_get(session_ke...
false
false
false
false
false
0
add(string txt) { if (DISABLE_TRACE) return; FILE *fp; fp = fopen(TRACE_SAVE_IN_FILE, "a"); if (fp == NULL) return; // crap! can't save fprintf(fp,"%s\n", txt.c_str()); fclose(fp); }
false
false
false
false
false
0
gnumeric_isprime (GnmFuncEvalInfo *ei, GnmValue const * const *args) { int yesno; gnm_float i = gnm_floor (value_get_as_float (args[0])); if (i < 0) yesno = 0; else if (i > bit_max) yesno = -1; else yesno = isprime ((guint64)i); if (yesno == -1) return value_new_error (ei->pos, OUT_OF_BOUNDS); else r...
false
false
false
false
false
0
server_free(struct network_server *ns) { if (!ns) return; /* FIXME: Missing release/free all bnepX interfaces */ if (ns->record_id) remove_record_from_server(ns->record_id); g_free(ns->iface); g_free(ns->name); g_free(ns->bridge); g_slist_free_full(ns->sessions, session_free); g_free(ns); }
false
false
false
false
false
0
an2ln_default(krb5_context context, char *rule, krb5_const_principal aname, size_t lnsize, char *lname) { krb5_error_code ret; const char *res; int root_princs_ok; if (strcmp(rule, "NONE") == 0) return KRB5_NO_LOCALNAME; if (strcmp(rule, "DEFAULT") == 0) root_princs_ok = 0; ...
false
false
false
false
false
0
ocfs2_local_alloc_new_window(struct ocfs2_super *osb, handle_t *handle, struct ocfs2_alloc_context *ac) { int status = 0; u32 cluster_off, cluster_count; struct ocfs2_dinode *alloc = NULL; struct ocfs2_local_alloc *la; alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; la = OCFS2_LOCAL_ALLOC(...
false
false
false
false
false
0
xfer_delete(struct xfer_header *xfer) { struct xfer_item *item; int r; /* 7) local delete of mailbox * & remove local "remote" mailboxlist entry */ for (item = xfer->items; item; item = item->next) { /* Set mailbox as DELETED on local server (need to also reset to local partition, otherwi...
false
false
false
false
false
0
is_main_block_head(Ctrl_task *c, proc_kind proc) { Block_info *b_info = ctrl_task_get_b_info(c); Block *block = block_info_get_block(b_info); return (proc == PROC_CPU && block->outer == NULL && block->module->kind == MODULE_MAIN); }
false
false
false
false
false
0
gst_ebml_read_buffer (GstEbmlRead * ebml, guint32 * id, GstBuffer ** buf) { guint64 length; guint prefix; GstFlowReturn ret; ret = gst_ebml_peek_id_full (ebml, id, &length, &prefix); if (ret != GST_FLOW_OK) return ret; /* we just at least peeked the id */ if (!gst_byte_reader_skip (gst_ebml_read_br ...
false
false
false
false
false
0
print_queue(void) { struct oops *oops; struct oops *queue; int count = 0; queue = queued_oopses; queued_oopses = NULL; barrier(); oops = queue; while (oops) { struct oops *next; printf("Submit text is:\n---[start of oops]---\n%s\n---[end of oops]---\n", oops->text); next = oops->next; free(oops->text)...
false
false
false
false
false
0
bld_driver_iter(struct h_t *hp) { register int32 iti; int32 iti2; struct h_t *hp2, *ihp; vpiHandle ihref; struct pviter_t *iterp; __acc_vpi_erroff = TRUE; ihref = vpi_iterate(vpiDriver, (vpiHandle) hp); if (__my_vpi_chk_error()) { __acc_err(1983, "acc_next_driver error finding first %s", to_acc_onam(_...
false
true
false
false
false
1
lio_target_cleanup_nodeacl( struct se_node_acl *se_nacl) { struct iscsi_node_acl *acl = container_of(se_nacl, struct iscsi_node_acl, se_node_acl); struct config_item *df_item; struct config_group *stats_cg; int i; stats_cg = &acl->se_node_acl.acl_fabric_stat_group; for (i = 0; stats_cg->default_groups[i]; i++...
false
true
false
false
false
1
toggle_scrollbars(void) { GtkWidget *widgets[2]; widgets[0] = GTK_WIDGET(hscroll); widgets[1] = GTK_WIDGET(vscroll); if (toggle_widgets(widgets, 2, &options->scrollbars) && options->scrollbars) update_scrollbars(); return FALSE; }
false
false
false
false
false
0
paintHover(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { if (m_hidden || m_layerHidden) return; if (!hasRubberBandLeg()) { ItemBase::paintHover(painter, option, widget); return; } QPainterPath path; path.addRect(0, 0, m_size.width(), m_size.height()); ItemBase::paintHover(pai...
false
false
false
false
false
0
transport_tests(int iterations, int clients) { int rc = 0; #ifdef CHEAT_CHECKS memset(SeqNums, 0, sizeof(SeqNums)); #endif rc += (clients <= 0) ? channelpair(echoclient, echoserver, iterations) : clientserver(echoclient, echoserver, iterations, clients); #ifdef CHEAT_CHECKS memset(SeqNums, 0, sizeof(SeqNums...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gui__controls__EditLine_AdjustBuffer(struct __ecereNameSpace__ecere__gui__controls__EditLine * this, int count) { char * buffer; int newSize; count = count + 1; newSize = (count + (count >> 1)); if(this->size > newSize) { buffer = __ecereNameSpace__ecere__com__eSystem_New(sizeof(...
false
false
false
false
false
0
odbc_obj_disconnect(struct odbc_obj *obj) { int res; SQLINTEGER err; short int mlen; unsigned char msg[200], state[10]; SQLHDBC con; /* Nothing to disconnect */ if (!obj->con) { return ODBC_SUCCESS; } con = obj->con; obj->con = NULL; res = SQLDisconnect(con); if (obj->parent) { if (res == SQL_SUCCESS...
true
true
false
false
false
1
o_edit_show_hidden (GSCHEM_TOPLEVEL *w_current, const GList *o_list) { /* this function just shows the hidden text, but doesn't toggle it */ /* this function does not change the CHANGED bit, no real changes are */ /* made to the schematic */ /* toggle show_hidden_text variable, which when it is true */ /* me...
false
false
false
false
false
0
parse_known_network_arguments(char *p, char **op) { gfarm_error_t e; char *tmp, *address; struct gfarm_hostspec *hostspecp; /* assert(strcmp(*op, "known_network") == 0); */ e = gfarm_strtoken(&p, &address); if (e != GFARM_ERR_NO_ERROR) return (e); if (address == NULL) return (GFARM_ERRMSG_MISSING_ADDRESS_A...
false
false
false
false
false
0
ocrdma_alloc_ucontext_pd(struct ocrdma_dev *dev, struct ocrdma_ucontext *uctx, struct ib_udata *udata) { int status = 0; uctx->cntxt_pd = _ocrdma_alloc_pd(dev, uctx, udata); if (IS_ERR(uctx->cntxt_pd)) { status = PTR_ERR(uctx->cntxt_pd); uctx->cntxt_pd = NULL; goto err; } uctx->cntxt_pd->uc...
false
false
false
false
false
0
add_missing_basenames (struct spec_entry *entries, char *name) { struct spec_entry *entry; for (entry = entries; entry; entry = entry->next) { if (entry->missing_basename) { /* Insert NAME into the right place in ENTRY->TEXT. */ char *info, *rest, *text; size_t name_l...
false
false
false
false
false
0
nmc93cX6_read(struct nmc93cX6_group *g) { u_int res; int i; res = g->eeprom_reg; for(i=0;i<g->nr_eeprom;i++) { if (!(g->eeprom_reg & (1 << g->def[i]->select_bit))) continue; if (g->state[i].dataout_val) res |= 1 << g->def[i]->dout_bit; else res &= ~(1 << g->de...
false
false
false
false
false
0
handle_list_command(String *args, int offset) { Macro *spec; int result = 1; int mflag; ListOpts opts = { 0, 0, NULL }; if (!(spec = macro_spec(args, offset, &mflag, &opts))) result = 0; if (result) result = list_defs(NULL, spec, mflag, &opts); if (spec) nuke_macro(spec); return newint(...
false
false
false
false
false
0
gs_setoverprint(gs_state * pgs, bool ovp) { bool prior_ovp = pgs->overprint; cmm_dev_profile_t *profile_struct; gx_device *dev = pgs->device; /* Check if overprint is disabled */ if (dev != NULL) { if (dev->procs.get_profile == NULL) { profile_struct = dev->icc_struct; ...
false
false
false
false
false
0
model_render_shields( polymodel * pm ) { model_set_outline_color(255,255,255); int i, j; shield_tri *tri; vertex pnt0, tmp, prev_pnt; if ( Interp_flags & MR_SHOW_OUTLINE_PRESET ) { return; } gr_set_color(0, 0, 200 ); // Scan all the triangles in the mesh. for (i=0; i<pm->shield.ntris; i++ ) { tri = &pm...
false
false
false
false
false
0
string_equal(x, y) object x, y; { int i, j; char *p, *q; /* if (type_of(x) != t_string || type_of(y) != t_string) error("string expected"); */ i = x->st.st_fillp; j = y->st.st_fillp; if (i != j) return(FALSE); p = x->st.st_self; q = y->st.st_self; for (i = 0; i < j; i++) if ((isLower(p[i]) ? p[i] - ('...
false
false
false
false
false
0
show_replace_widgets (GtrSearchDialog * dlg, gboolean show_replace) { if (show_replace) { gtk_widget_hide (dlg->priv->original_text_checkbutton); gtk_widget_hide (dlg->priv->translated_text_checkbutton); /* * Set the default value of checkbutton */ gtk_toggle_button_set_acti...
false
false
false
false
false
0
freeConn(ConnType *conn) { register long key=CKEY(conn->head.id); register ConnType *prev=Chash[key]; if (prev==conn) { Chash[key]=conn->link; } else { while (prev && prev->link != conn) prev=prev->link; if (!prev) { fprintf(stderr,"Freeing free connection\n"); return; } prev->link=conn->link; }...
false
false
false
false
false
0
addEntry(const QString& entry) { if (entry != QLatin1String("!")) { m_stringMatcher.add(entry); } else { m_stringMatcher.clear(); } }
false
false
false
false
false
0
DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */) { int8_t iAdaptersFound(0); #if defined(HAVE_P8_USB) if (!CUSBCECAdapterDetection::CanAutodetect()) { if (m_lib) m_lib->AddLog(CEC_LOG_WARNING, "libCEC has not been compiled with detection code ...
false
false
false
false
false
0
git_index_pack_config(const char *k, const char *v, void *cb) { struct pack_idx_option *opts = cb; if (!strcmp(k, "pack.indexversion")) { opts->version = git_config_int(k, v); if (opts->version > 2) die("bad pack.indexversion=%"PRIu32, opts->version); return 0; } return git_default_config(k, v, cb); }
false
false
false
false
false
0
ComputeOutputWholeExtent(int extent[6], int handleBoundaries) { int idx; if ( ! handleBoundaries) { // Make extent a little smaller because of the kernel size. for (idx = 0; idx < 3; ++idx) { extent[idx*2] += this->KernelMiddle[idx]; ...
false
false
false
false
false
0
run_program (RunProgramPlugin *plugin) { gchar *target; gchar *quote_target; gchar *dir = NULL; gchar *dir_uri = NULL; gchar *args = NULL; gchar **env = NULL, **merged_env = NULL; gchar *cmd; gboolean run_in_terminal = FALSE; GPid pid; target = get_local_executable (GTK_WINDOW (ANJUTA_PLUGIN (plugin)->shell)...
false
false
false
false
false
0
pr_dt_init(FILE *fp, Statement *dt_init, int level) { if (dt_init != NULL) { indent(fp, level); fputs("??dt_init{\n", fp); pr_statement(fp, dt_init, level+2); indent(fp, level); fputs("} % ??dt_init\n", fp); } }
false
false
false
false
false
0
addressing_props_changed (TpAccount *self, GHashTable *changed_properties) { const gchar * const * v; if (self->priv->uri_schemes == NULL) /* We did not fetch the initial value yet, ignoring */ return; v = tp_asv_get_strv (changed_properties, "URISchemes"); if (v == NULL) return; g_strfreev...
false
false
false
false
false
0
wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue) { int ret; struct sdio_func *func = dev_to_sdio_func(glue->dev); struct mmc_card *card = func->card; ret = pm_runtime_get_sync(&card->dev); if (ret) { /* * Runtime PM might be temporarily disabled, or the device * might have a positive reference counter....
false
false
false
false
false
0
exo_icon_view_start_editing (ExoIconView *icon_view, ExoIconViewItem *item, ExoIconViewCellInfo *info, GdkEvent *event) { GtkCellRendererMode mode; GtkCellEditable *editable; GdkRectangle cell_a...
false
false
false
true
false
1
gzfile_writer_end_run(VALUE arg) { struct gzfile *gz = (struct gzfile *)arg; if (!(gz->z.flags & GZFILE_FLAG_HEADER_FINISHED)) { gzfile_make_header(gz); } zstream_run(&gz->z, (Bytef*)"", 0, Z_FINISH); gzfile_make_footer(gz); gzfile_write_raw(gz); return Qnil; }
false
false
false
false
false
0
export_hkl_data( const HKL_data_base& cdata, const MTZdataset& cset, const MTZcrystal& cxtl, const String mtzpath ) { export_crystal( cxtl, mtzpath ); export_dataset( cset, mtzpath ); export_hkl_data( cdata, mtzpath ); }
false
false
false
false
false
0
e_order_files_prepend_relative(E_Order *eo, Eina_List *files, Efreet_Desktop *before) { Eina_List *l; const char *file; E_OBJECT_CHECK(eo); E_OBJECT_TYPE_CHECK(eo, E_ORDER_TYPE); EINA_LIST_FOREACH(files, l, file) { Efreet_Desktop *desktop; if (!strncmp(file, "file://", 7)) ...
false
false
false
false
false
0
dlm_lowcomms_addr(int nodeid, struct sockaddr_storage *addr, int len) { struct sockaddr_storage *new_addr; struct dlm_node_addr *new_node, *na; new_node = kzalloc(sizeof(struct dlm_node_addr), GFP_NOFS); if (!new_node) return -ENOMEM; new_addr = kzalloc(sizeof(struct sockaddr_storage), GFP_NOFS); if (!new_add...
false
true
false
false
false
1
window_list_fill( WindowList *wl ) { GList *winlist, *item; WnckScreen *screen; gtk_list_store_clear( GTK_LIST_STORE( wl ) ); screen = wnck_screen_get_default(); winlist = wnck_screen_get_windows_stacked( screen ); for( item = winlist; item; item = item->next ) { WnckWindow *window = item->data; ...
false
false
false
false
false
0
take_offline(NCR_Instance inst) { inst->opmode = MD_OFFLINE; if (inst->timer_running) { SCH_RemoveTimeout(inst->timeout_id); inst->timer_running = 0; } /* Mark source unreachable */ SRC_ResetReachability(inst->source); }
false
false
false
false
false
0
DuplicateBuildTarget(int index, const wxString& newName) { ProjectBuildTarget* newTarget = nullptr; ProjectBuildTarget* target = GetBuildTarget(index); if (target) { newTarget = new ProjectBuildTarget(*target); wxString newTargetName = !newName.IsEmpty() ? newName : (_("Copy of ") + targ...
false
false
false
false
false
0
cmd_module(struct userrec *u, int idx, char *par) { putlog(LOG_CMDS, "*", "#%s# module %s", dcc[idx].nick, par); do_module_report(idx, 2, par[0] ? par : NULL); }
false
false
false
false
false
0
is_solid( unsigned char* pat, unsigned int width, unsigned int height ) { unsigned int nbits = width * height; unsigned int n_whole_bytes = nbits >> 3; unsigned char* last_byte = &pat[n_whole_bytes]; for (register unsigned char* cp = pat; cp < last_byte; cp++) { if (*cp != 0xff) { return false...
false
false
false
false
false
0
DtsSymbIntSiBuffer (HANDLE hDevice, uint8_t* pInputBuffer, ULONG ulSize) { DTS_LIB_CONTEXT *Ctx = NULL; DTS_GET_CTX(hDevice,Ctx); SYMBINT *pSymbint = &(Ctx->PESConvParams.m_SymbInt); pSymbint->m_pCurrent = pSymbint->m_pInputBuffer = (uint8_t*) pInputBuffer; pSymbint->m_nSize = ulSize; pSymbint->m_pInputBuffer...
false
false
false
false
false
0
get_best_from_stack(NODE **start, int *stacknum) { NODE *tmp; /* return top */ tmp=(*start); if ((*start)!=NULL) { /* delete it from stack */ (*start)=(*start)->next; if ((*start)!=NULL) (*start)->prev=NULL; (*stacknum)--; return(tmp); } else { return(NULL); } }
false
false
false
false
false
0
addIndicesToPlaylist( QModelIndexList indices, Playlist::AddOptions options ) { if( indices.isEmpty() ) return; // let tracks & playlists appear in playlist as they are shown in the view: qSort( indices ); QList<KUrl> urls; foreach( const QModelIndex &index, indices ) { KFileIt...
false
false
false
false
false
0
mvs_94xx_isr_status(struct mvs_info *mvi, int irq) { void __iomem *regs = mvi->regs_ex; u32 stat = 0; if (!(mvi->flags & MVF_FLAG_SOC)) { stat = mr32(MVS_GBL_INT_STAT); if (!(stat & (MVS_IRQ_SAS_A | MVS_IRQ_SAS_B))) return 0; } return stat; }
false
false
false
false
false
0
check_ambiguous_candidates(GtArray *candidates, GtArray *groups, GtHashmap *features, unsigned long *progress, GtError *err) { GtGenomeNode *candidate; GtBittab *group; GtArray *compat_groups; int h...
false
false
false
false
false
0
rl_complete (ignore, invoking_key) int ignore, invoking_key; { if (rl_inhibit_completion) return (_rl_insert_char (ignore, invoking_key)); else if (rl_last_func == rl_complete && !completion_changed_buffer) return (rl_complete_internal ('?')); else if (_rl_complete_show_all) return (rl_complete_i...
false
false
false
false
false
0
format(const char *fmt, ...) { va_list val; va_start(val, fmt); String s = vformat(fmt, val); va_end(val); return s; }
false
false
false
false
false
0
option_has_name(option_t *opt, const char *name) { if (!strcmp(opt->name, name)) return 1; if (!strcmp(opt->name, "PageSize") && !strcmp(name, "PageRegion")) return 1; return 0; }
false
false
false
false
false
0
opj_mct_encode_custom( OPJ_BYTE * pCodingdata, OPJ_UINT32 n, OPJ_BYTE ** pData, OPJ_UINT32 pNbComp, OPJ_UINT32 isSigned) { OPJ_FLOAT32 * lMct = (OPJ_FLOAT32 *) pCodingdata; OPJ_UINT32 i; OPJ_UINT32 j; OPJ_UINT32 k; OPJ_UINT32 lNbMatCoeff = pNbComp * pNbComp; OPJ_INT32 * lCu...
false
false
false
false
true
1
auxSolidCone (GLdouble base, GLdouble height) { GLUquadricObj *quadObj; GLdouble *sizeArray, *tmp; GLuint displayList; sizeArray = (GLdouble *) malloc (sizeof (GLdouble) * 2); tmp = sizeArray; *tmp++ = base; *tmp++ = height; displayList = findList (CONEWIRE, sizeArray, 2); if (disp...
false
false
false
false
false
0
xmldoc_has_nodes(struct ast_xml_node *fixnode) { struct ast_xml_node *node = fixnode; for (node = ast_xml_node_get_children(fixnode); node; node = ast_xml_node_get_next(node)) { if (strcasecmp(ast_xml_node_get_name(node), "text")) { return 1; } } return 0; }
false
false
false
false
false
0
_updatePCZSceneNode( PCZSceneNode * pczsn ) { // Skip if root Zone has been destroyed (shutdown conditions) if (!mDefaultZone) return; // Skip if the node is the sceneroot node if (pczsn == getRootSceneNode()) return; // clear all references to visi...
false
false
false
false
false
0
vcan_init_module(void) { pr_info("vcan: Virtual CAN interface driver\n"); if (echo) printk(KERN_INFO "vcan: enabled echo on driver level.\n"); return rtnl_link_register(&vcan_link_ops); }
false
false
false
false
false
0
base32_dec (uint8_t *dst, uint8_t *src) { uint8_t tmp[ONION_LENP1]; unsigned int i; for (i = 0; i < 16; i++) { if (src[i] >= 'a' && src[i] <= 'z') { tmp[i] = src[i] - 'a'; } else { if (src[i] >= '2' && src[i] <= '7') tmp[i] = src[i] - '1' + ('z' - 'a'); else { /* Bad character detected. ...
false
false
false
false
false
0
QueryDoubleText( double* dval ) const { if ( FirstChild() && FirstChild()->ToText() ) { const char* t = FirstChild()->ToText()->Value(); if ( XMLUtil::ToDouble( t, dval ) ) { return XML_SUCCESS; } return XML_CAN_NOT_CONVERT_TEXT; } return XML_NO_TEXT_NODE...
false
false
false
false
false
0
diffusion_event (GfsEvent * event, GfsSimulation * sim) { GfsDiffusion * d = GFS_DIFFUSION (event); if (gfs_function_get_constant_value (d->val) == G_MAXDOUBLE) { if (d->mu == NULL && (d->mu = gfs_function_get_variable (d->val)) == NULL) d->mu = gfs_domain_add_variable (GFS_DOMAIN (sim), NULL, NULL); ...
false
false
false
false
false
0
hookup_DFF_CE(NetFF*ff, NetESignal*d, NetEvProbe*pclk, NetNet*ce, NetAssign_*a, unsigned rval_pinoffset) { // a->sig() is a *NetNet, which doesn't have the loff_ and // lwid_ context. Add the correction for loff_ ourselves. // This extra calculation allows for assignments like: // lv...
false
false
false
false
false
0
releaseResources(ResourceKey* resources) { ResourceKey* curResource; ResourceKey* nextResource; nextResource = resources; while(nextResource != NULL) { curResource = nextResource; free(curResource->key); releaseResourceData(curResource->data); nextResource = nextResource->next; free(curRe...
false
false
false
false
false
0
zxid_show_map(zxid_conf* cf, struct zxid_map* mp) { struct zx_str* inmap = zx_dup_str(cf->ctx, ""); for (; mp; mp = mp->n) { inmap = zx_strf(cf->ctx, " rule=%d$ ns(%s)$ src(%s)$ dst(%s)$ ext(%s);\n%.*s", mp->rule, STRNULLCHK(mp->ns), STRNULLCHK(mp->src), STRNULLCHK(mp->dst), STRNULLCHK(mp->ext), inmap->len, in...
false
false
false
false
false
0
main() { cout<<"Available subcommands:"<<endl; std::list<Application*> alist2=getSortedApplicationList(); for(std::list<Application*>::const_iterator p=alist2.begin();p!=alist2.end();p++) { if(((*p)->includeInDefaultInstallation())^hiddenOption.getValue()) cout << "gfan"<<(*p)->nam...
false
false
false
false
false
0
trash_backend_item_deleted (TrashItem *item, gpointer user_data) { GVfsBackendTrash *backend = user_data; GVfsMonitor *monitor; monitor = trash_backend_get_dir_monitor (backend, FALSE); if (monitor) { char *slashname; slashname = g_strconcat ("/", trash_item_get_...
false
false
false
false
false
0
kjDict_ass_subscript(PyObject *Set, PyObject *key, PyObject *thing) { PyObject *mem, *map; TableWrapper *S; Dprint(("kjDict_ass_subscript\n")); S = (TableWrapper *) Set; if (S->hashvalue != NOHASH) { Wset_hash_error(); return -1; } if (thing == NULL) { /* request to delete */ if (deleteFro...
false
false
false
false
false
0
setVariable(const as_environment& env, const std::string& varname, const as_value& val, const as_environment::ScopeStack& scope) { IF_VERBOSE_ACTION( log_action(_("-------------- %s = %s"), varname, val); ); // Path lookup rigamarole. std::string path; std::string var; if (parsePat...
false
false
false
false
false
0
lame_set_no_short_blocks(lame_global_flags * gfp, int no_short_blocks) { /* enforce disable/enable meaning, if we need more than two values we need to switch to an enum to have an apropriate representation of the possible meanings of the value */ if (0 > no_short_blocks || 1 < no_short_blocks) ...
false
false
false
false
false
0
addRow(ListboxItem* item, uint col_id, uint row_id) { uint col_idx = 0; // Build the new row ListRow row; row.d_sortColumn = getSortColumn(); row.d_items.resize(getColumnCount(), 0); row.d_rowID = row_id; if (item) { // discover which column to initially set col_idx = getColumnWithID(col_id); // establ...
false
false
false
false
false
0
get_interval(struct urb *urb, __u8 interval) { u16 time = 1; int i; if (urb->dev->speed == USB_SPEED_HIGH) { if (interval > IITV) time = IITV; else time = interval ? interval - 1 : 0; } else { if (interval > 128) { time = IITV; } else { /* calculate the nearest value for PIPEPERI */ for (i =...
false
false
false
false
false
0
clutter_gst_auto_video_sink_get_caps (GstPad *pad) { GstCaps *ret; ClutterGstAutoVideoSink *bin = CLUTTER_GST_AUTO_VIDEO_SINK ( gst_pad_get_parent (pad)); if (bin->video_caps) { ret = gst_caps_ref (bin->video_caps); } else { ret = gst_static_pad_template_get_caps (&sink_template_fac...
false
false
false
false
false
0
checkPICSratingSafeNet(String r) { checkPICSagainstoption(r, "n ", (*o.fg[filtergroup]).pics_safenet_nudity, "SafeNet nudity"); if (isItNaughty) {return;} checkPICSagainstoption(r, "s ", (*o.fg[filtergroup]).pics_safenet_sex, "SafeNet sex"); if (isItNaughty) {return;} checkPICSagainstoption(r, "v ", (*o.fg[filterg...
false
false
false
false
false
0
reconnect_ups(void) { int ret; upsdebugx(4, "=================================================="); upsdebugx(4, "= device has been disconnected, try to reconnect ="); upsdebugx(4, "=================================================="); ret = comm_driver->open(&udev, &curDevice, subdriver_matcher, NULL); if (ret...
false
false
false
false
false
0
__put(std::ostream& os) const { os << "difference {\n"; for (Difference::const_iterator i = __objects.begin(); i != __objects.end(); i++) { os << *(*i); } for (size_t i=0; i<numberOfTransformations(); i++) { os << __trans[i]->povWrite() << '\n'; } os << "}\n"; return os; }
false
false
false
false
false
0
regex_device_id(const char *device_id) /* I - IEEE-1284 device ID */ { char res[2048], /* Regular expression string */ *ptr; /* Pointer into string */ regex_t *re; /* Regular expression */ int cmd; /* Command set string? */ fprintf(stderr, "DEBUG: [cups-driverd] regex_device_id(\"%s\")\n", device_i...
false
false
false
false
false
0
separate_class_package (tree decl) { if (decl) { tree type = TREE_TYPE (decl); return type && TREE_CODE (type) == RECORD_TYPE && (TYPE_METHODS (type) || has_static_fields (type)); } else return false; }
false
false
false
false
false
0
vectorize(char *str, const char *tok, int *num_tok_p) { char **vect_p; char *tmp, *str_p, *tok_p; int tok_c, tok_n; /* count the tokens */ tmp = string_copy(str); if (tmp == NULL) { return NULL; } str_p = tmp; tok_c = 0; while (1) { tok_p = strsep(&str_p, tok); if (tok_p == NULL) {...
false
false
false
false
false
0
transop_decode_aes( n2n_trans_op_t * arg, uint8_t * outbuf, size_t out_len, const uint8_t * inbuf, size_t in_len ) { int len=0; transop_aes_t * priv = (transop_aes_t *)arg-...
false
true
false
false
false
1
grammar_rules_print_xml (FILE *out, int level) { rule_number r; bool first = true; for (r = 0; r < nrules + nuseless_productions; r++) { if (first) xml_puts (out, level + 1, "<rules>"); first = false; { char const *usefulness; if (rule_useless_in_grammar_p (&rules[r]...
false
false
false
false
false
0
valid_wild_card(const char *luser, const char *lhost) { const char *p; char tmpch; int nonwild = 0; int bitlen; /* user has no wildcards, always accept -- jilles */ if(!strchr(luser, '?') && !strchr(luser, '*')) return 1; /* check there are enough non wildcard chars */ p = luser; while((tmpch = *p++)) { ...
false
false
false
false
false
0
JS_LookupUCProperty(JSContext *cx, JSObject *obj, const jschar *name, size_t namelen, jsval *vp) { JSObject *obj2; JSProperty *prop; CHECK_REQUEST(cx); return LookupUCProperty(cx, obj, name, namelen, JSRESOLVE_QUALIFIED, &obj2, &prop) ...
false
false
false
false
false
0
tp_properties_context_has (TpPropertiesContext *ctx, guint property) { g_assert (property < ctx->mixin_cls->num_props); return (tp_intset_is_member (ctx->remaining, property)); }
false
false
false
false
false
0
mail_cache_db_get(struct mail_cache_db * cache_db, const void * key, size_t key_len, void ** pvalue, size_t * pvalue_len) { #if DBVERS >= 1 int r; DBT db_key; DBT db_data; DB * dbp; dbp = cache_db->internal_database; memset(&db_key, 0, sizeof(db_key)); memset(&db_data, 0, sizeof(db_data)); db_...
false
false
false
false
false
0
iwl_mvm_resume_d0i3(struct iwl_mvm *mvm) { bool exit_now; enum iwl_d3_status d3_status; iwl_trans_d3_resume(mvm->trans, &d3_status, false); /* * make sure to clear D0I3_DEFER_WAKEUP before * calling iwl_trans_resume(), which might wait * for d0i3 exit completion. */ mutex_lock(&mvm->d0i3_suspend_mutex); ...
false
false
false
false
false
0
readValue() { Token token; skipCommentTokens( token ); bool successful = true; if ( collectComments_ && !commentsBefore_.empty() ) { currentValue().setComment( commentsBefore_, commentBefore ); commentsBefore_ = ""; } switch ( token.type_ ) { case tokenObjectBegin: succ...
false
false
false
false
false
0
snd_ice1712_pro_internal_clock_default_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { int val; static const unsigned int xrate[13] = { 8000, 9600, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }; for (val = 0; val < 13; val++) { if (xrate[v...
false
false
false
false
false
0
gnucash_sheet_virt_cell_out_of_bounds (GnucashSheet *sheet, VirtualCellLocation vcell_loc) { return (vcell_loc.virt_row < 1 || vcell_loc.virt_row >= sheet->num_virt_rows || vcell_loc.virt_col < 0 || vcell_loc.virt_col >= sheet->num_virt_cols...
false
false
false
false
false
0
chat_l_create_event( chat_l_io_event_queue_t * q, int fd, chat_io_event_callback_t cb, void * user_arg, int mtimeout) { chat_io_event_t * event; event = (chat_...
false
false
false
false
false
0