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
tolua_px_ecl_Drawable_size00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const Drawable",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { const Drawable* self = (const Drawable*) tolua_tousertype(tolua_S...
false
false
false
false
false
0
flower_update_mono(int ch, INT16 *buffer, int length) { sound_channel *voice; short *mix; int i; /* if no sound, we're done */ if (sound_enable == 0) { memset(buffer, 0, length * 2); return; } /* zap the contents of the mixer buffer */ memset(mixer_buffer, 0, length * sizeof(short)); /*...
false
false
false
false
false
0
ooCallGenerateSessionID (OOH323CallData *call, OOCapType type, char *dir) { unsigned sessionID=0; if(type == OO_CAP_TYPE_AUDIO) { if(!ooGetLogicalChannel(call, 1, dir)) { sessionID = 1; } else{ if(call->masterSlaveState == OO_MasterSlave_Master) session...
false
false
false
false
false
0
go_arrow_type_from_str (const char *name) { unsigned ui; GOArrowType ret = GO_ARROW_NONE; for (ui = 0; ui < G_N_ELEMENTS (arrow_types); ui++) { if (strcmp (arrow_types[ui].name, name) == 0) { ret = arrow_types[ui].typ; break; } } return ret; }
false
false
false
false
false
0
iscsi_remove_host(struct transport_container *tc, struct device *dev, struct device *cdev) { struct Scsi_Host *shost = dev_to_shost(dev); struct iscsi_cls_host *ihost = shost->shost_data; if (ihost->bsg_q) { bsg_unregister_queue(ihost->bsg_q); blk_cleanup_queue(ihost->bsg_q); } return 0; }
false
false
false
false
false
0
setCallbackFunction(CmtCallbackSelector tp, int32_t instance, CmtCallbackFunction func, void* param) { switch (tp) { case CMT_CALLBACK_ONMESSAGERECEIVED: m_onMessageReceived = func; m_onMessageReceivedInstance = instance; m_onMessageReceivedParam = param; return m_lastResult = XRV_OK; case CMT_CALLBACK_ONME...
false
false
false
false
false
0
ves_icall_System_Type_EqualsInternal (MonoReflectionType *type, MonoReflectionType *c) { MONO_ARCH_SAVE_REGS; if (c && type->type && c->type) return mono_metadata_type_equal (type->type, c->type); else return (type == c) ? TRUE : FALSE; }
false
false
false
false
false
0
conversion_cancel_track_sub(GList **ctracks, Track *track, gboolean remove) { GList *gl; g_return_if_fail (track && track->userdata); gl = g_list_find_custom(*ctracks, track, conversion_cancel_track_cmp); if (gl) { ConvTrack *ctr = gl->data; g_return_if_fail (ctr); if (ctr->tra...
false
false
false
false
false
0
uv__async_init(uv_loop_t* loop) { if (loop->async_pipefd[0] != -1) return 0; if (uv__make_pipe(loop->async_pipefd, UV__F_NONBLOCK)) return -1; uv__io_init(&loop->async_watcher, uv__async_io, loop->async_pipefd[0]); uv__io_start(loop, &loop->async_watcher, UV__POLLIN); return 0; }
false
false
false
false
false
0
get_echo_char (int timestamp) { if(echo_start!=echo_end) { if (timestamp > echo_start->timestamp) { int x = echo_start->ch; echo_start++; if (echo_start >= &echo_buffer[ECHO_BUFFER_LEN]) echo_start = echo_buffer; return x; } } return TX_BUSY;...
false
false
false
false
false
0
coda(string const &stem, string &warn) { warn.clear(); if (monitors().empty()) { warn.append("There are no monitors\n"); return; } CODA0(monitors(), stem, warn); CODA(monitors(), stem, nchain(), warn); TABLE0(monitors(), stem, warn); TABLE(monitors(), stem, nchain(), warn...
false
false
false
false
false
0
count11(const Word16 *values, const Word16 width, Word16 *bitCount) { Word32 t0,t1,i; Word16 bc11,sc; bc11=0; sc=0; for(i=0;i<width;i+=2){ t0=ABS(values[i+0]); t1=ABS(values[i+1]); bc11 = bc11 + huff_ltab11[t0][t1]; sc = sc + (t0>0) + (t1>0); ...
false
false
false
false
false
0
gst_dtmf_src_class_init (GstDTMFSrcClass * klass) { GObjectClass *gobject_class; GstBaseSrcClass *gstbasesrc_class; GstElementClass *gstelement_class; gobject_class = G_OBJECT_CLASS (klass); gstbasesrc_class = GST_BASE_SRC_CLASS (klass); gstelement_class = GST_ELEMENT_CLASS (klass); GST_DEBUG_CATEGORY_...
false
false
false
false
false
0
api_cede (pTHX) { struct coro_transfer_args ta; prepare_cede (aTHX_ &ta); if (ecb_expect_true (ta.prev != ta.next)) { TRANSFER (ta, 1); return 1; } else return 0; }
false
false
false
false
false
0
cp_parser_base_specifier (cp_parser* parser) { cp_token *token; bool done = false; bool virtual_p = false; bool duplicate_virtual_error_issued_p = false; bool duplicate_access_error_issued_p = false; bool class_scope_p, template_p; tree access = access_default_node; tree type; /* Process the optional...
false
false
false
false
false
0
rb_erase (rb_node_t * node, rb_node_t ** root) { rb_node_t *child, *parent; int color; if (!node->rb_left) child = node->rb_right; else if (!node->rb_right) child = node->rb_left; else { rb_node_t *old = node, *left; node = node->rb_right; while ((left = node->rb_left)) node =...
false
false
false
false
false
0
dnet_get_hwaddr(struct dnet *bp) { u16 tmp; u8 addr[6]; /* * from MAC docs: * "Note that the MAC address is stored in the registers in Hexadecimal * form. For example, to set the MAC Address to: AC-DE-48-00-00-80 * would require writing 0xAC (octet 0) to address 0x0B (high byte of * Mac_addr[15:0]), 0xDE ...
false
false
false
false
false
0
moveresize(const Arg *arg) { XEvent ev; Monitor *m = selmon; if(!(m->sel && arg && arg->v)) return; if(m->lt[m->sellt]->arrange && !m->sel->isfloating) togglefloating(NULL); resize(m->sel, m->sel->x + ((int *)arg->v)[0], m->sel->y + ((int *)arg->v)[1], m->sel->w + ((int *)arg->v)[2], m->sel-...
false
false
false
false
false
0
import_hkl_list( HKL_info& target ) { if ( mode != READ ) Message::message( Message_fatal( "CCP4MTZfile: no file open for read" ) ); float fdata[1000], s; // file data: allow up to 1000 columns on file int idata[1000]; // flag data: allow up to 1000 columns on file HKL hkl; std::vector<HKL> hkls; ...
false
false
false
false
false
0
fallback(FbTk::ThemeItem_base &item) { if (&item == &m_texture) { return FbTk::ThemeManager::instance().loadItem(item, "toolbar", "Toolbar"); } else if (item.name().find(".borderWidth") != std::...
false
false
false
false
false
0
HandleSetOSDName(const cec_command &command) { if (command.parameters.size > 0) { CCECBusDevice *device = GetDevice(command.initiator); if (device) { char buf[1024]; for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++) buf[iPtr] = (char)command.parameters[iPtr]; buf[c...
false
false
false
false
false
0
fcoe_fcf_device_add(struct fcoe_ctlr_device *ctlr, struct fcoe_fcf_device *new_fcf) { struct fcoe_fcf_device *fcf; int error = 0; list_for_each_entry(fcf, &ctlr->fcfs, peers) { if (fcoe_fcf_device_match(new_fcf, fcf)) { if (fcf->state == FCOE_FCF_STATE_CONNECTED) return fcf; fcf->state = FCOE_...
false
false
false
false
false
0
ladish_studio_dbus_save_as(struct cdbus_method_call * call_ptr) { const char * new_name; log_info("SaveAs studio request"); if (!dbus_message_get_args(call_ptr->message, &cdbus_g_dbus_error, DBUS_TYPE_STRING, &new_name, DBUS_TYPE_INVALID)) { cdbus_error(call_ptr, DBUS_ERROR_INVALID_ARGS, "Invalid argument...
false
false
false
false
false
0
dsvec_lines(Dsvec *dsv, char *buf) { char *e, *p; Dsvec *av; if (dsv == NULL) av = dsvec_init(NULL, sizeof(char *)); else av = dsv; p = buf; while ((e = strchr(p, (int) '\n')) != NULL) { *e++ = '\0'; dsvec_add_ptr(av, p); p = e; } if (*p != '\0') dsvec_add_ptr(av, p); return(av); }
false
false
false
false
false
0
rinoo_spawn_get(t_sched *sched, int id) { if (id < 0 || id > sched->spawns.count) { return NULL; } if (id == 0) { return sched; } return sched->spawns.thread[id - 1].sched; }
false
false
false
false
false
0
print_resid (int ok, cs *A, double *x, double *b, double *resid) { int i, m, n ; if (!ok) { printf (" (failed)\n") ; return ; } m = A->m ; n = A->n ; for (i = 0 ; i < m ; i++) resid [i] = -b [i] ; /* resid = -b */ cs_gaxpy (A, x, resid) ; /* resid = resid + A*x */ pri...
false
false
false
false
false
0
match_str(UPSINFO *ups, int offset, const GENINFO * gen, const char *v) { char x[MAXSTRING]; long size = (long)gen; /* Copy the string so we can edit it in place */ astrncpy(x, v, sizeof(x)); /* Remove trailing comment, if there is one */ char *ptr = strchr(x, '#'); if (ptr) *ptr = '\0'; ...
false
false
false
false
false
0
rssyl_gtk_prop(RSSylFolderItem *ritem) { g_return_if_fail(ritem != NULL); rssyl_gtk_prop_real(ritem); }
false
false
false
false
false
0
brasero_cli_fake_device (const gchar *option_name, const gchar *value, gpointer data, GError **error) { BraseroMediumMonitor *monitor; GSList *list; /* Wait for the libbrasero-media to be ready */ monitor = brasero_medium_monitor_get_defaul...
false
false
false
false
false
0
role_units_translations(struct astring *astr, int flag, bool alts) { const int count = num_role_units(flag); if (4 < count) { if (alts) { astr_set(astr, _("%s or similar units"), utype_name_translation(get_role_unit(flag, 0))); } else { astr_set(astr, _("%s and similar units"), ...
false
false
false
false
false
0
compareTextAttribute(const DCM_ELEMENT * e1, const DCM_ELEMENT * e2, void *ctx) { char *c1; char *c2; char temp1[1024]; char temp2[1024]; int l; l = (e1->length < 1023) ? e1->length : 1023; strncpy(temp1, e1->d.string, l); temp1[l] = '\0'; l = (e2->length < 1023) ? e2->lengt...
true
true
false
false
false
1
agstrfree(Agraph_t * g, char *s) { refstr_t *r; Dict_t *strdict; if (s == NIL(char *)) return FAILURE; strdict = refdict(g); r = refsymbind(strdict, s); if (r && (r->s == s)) { r->refcnt--; if ((r->refcnt && CNT_BITS) == 0) { agdtdelete(g, strdict, r); /* if (g) agfree(g,...
false
false
false
false
false
0
ck_hp_purge(struct ck_hp_record *thread) { ck_backoff_t backoff = CK_BACKOFF_INITIALIZER; while (thread->n_pending > 0) { ck_hp_reclaim(thread); if (thread->n_pending > 0) ck_backoff_eb(&backoff); } return; }
false
false
false
false
false
0
glusterd_check_nfs_volfile_identical (gf_boolean_t *identical) { char nfsvol[PATH_MAX] = {0,}; char tmpnfsvol[PATH_MAX] = {0,}; glusterd_conf_t *conf = NULL; xlator_t *this = NULL; int ret ...
true
true
false
true
true
1
output(struct ipmi_rs * rsp) { /* Add checks to make sure it is actually SOL data, in general I see * outside code mostly trying to guard against this happening, but * some places fail to do so, so I do so here to make sure nothing gets * through. If non-sol data comes through here, there is probably * a pac...
false
false
false
false
false
0
fcgi_util_socket_make_domain_addr(pool *p, struct sockaddr_un **socket_addr, int *socket_addr_len, const char *socket_path) { int socket_pathLen = strlen(socket_path); if (socket_pathLen >= sizeof((*socket_addr)->sun_path)) { return ap_pstrcat(p, "path \"", socket_path, "...
false
false
false
false
false
0
step_handler(int op, String &str, Element *e, const Handler *h, ErrorHandler *errh) { Script *scr = (Script *) e; String data = cp_uncomment(str); int nsteps, steptype; int what = (uintptr_t) h->write_user_data(); scr->_run_handler_name = h->name(); scr->_run_args = String(); scr->_run_op = ...
false
false
false
false
false
0
python_cmd(UAContext *ua, const char *cmd) { #ifdef HAVE_PYTHON init_python_interpreter_args python_args; if (ua->argc >= 2 && strcasecmp(ua->argk[1], NT_("restart")) == 0) { term_python_interpreter(); python_args.progname = director->name(); python_args.scriptdir = director->scripts_directory...
false
false
false
false
false
0
pinctrl_check_ops(struct pinctrl_dev *pctldev) { const struct pinctrl_ops *ops = pctldev->desc->pctlops; if (!ops || !ops->get_groups_count || !ops->get_group_name) return -EINVAL; if (ops->dt_node_to_map && !ops->dt_free_map) return -EINVAL; return 0; }
false
false
false
false
false
0
n_noexpire(struct Luser *lptr, int ac, char **av) { struct NickInfo *nptr; if (ac < 2) { notice(n_NickServ, lptr->nick, "Syntax: \002NOEXPIRE <nickname> {ON|OFF}\002"); notice(n_NickServ, lptr->nick, ERR_MORE_INFO, n_NickServ, "NOEXPIRE"); return; } RecordCommand("%s: %s!%s@%s NOEXPIRE [%s]", ...
false
false
false
false
false
0
mv_conf_mbus_windows(struct platform_device *pdev, const struct mbus_dram_target_info *dram) { int i; void __iomem *regs; struct resource *res; if (!dram) { dev_err(&pdev->dev, "no mbus dram info\n"); return -EINVAL; } res = platform_get_resource(pdev, IORESOURCE_MEM, 1); if (!res) { dev_err(&pdev->d...
false
false
false
false
false
0
clpreauth_is_real(krb5_context context, clpreauth_handle h, krb5_preauthtype pa_type) { if (h->vt.flags == NULL) return 1; return (h->vt.flags(context, pa_type) & PA_REAL) != 0; }
false
false
false
false
false
0
GetCommonParent(const CServerPath& path) const { if (*this == path) return *this; if (m_bEmpty || path.m_bEmpty) return CServerPath(); if (m_type != path.m_type || (!traits[m_type].prefixmode && m_data->m_prefix != path.m_data->m_prefix)) { return CServerPath(); } if (!HasParent()) { if (path.IsSubd...
false
false
false
false
false
0
HPDF_Page_EofillStroke (HPDF_Page page) { HPDF_STATUS ret = HPDF_Page_CheckState (page, HPDF_GMODE_PATH_OBJECT | HPDF_GMODE_CLIPPING_PATH); HPDF_PageAttr attr; HPDF_PTRACE ((" HPDF_Page_EofillStroke\n")); if (ret != HPDF_OK) return ret; attr = (HPDF_PageAttr)page->attr; ...
false
false
false
false
false
0
sock_readable(connection *c) { int n, rc; rc = ioctl(c->fd, FIONREAD, &n); return rc == -1 ? 0 : n; }
false
false
false
false
false
0
screensaver_new(IterativeMap *map, Animation *animation) { ScreenSaver *self = SCREENSAVER(g_object_new(screensaver_get_type(), NULL)); int i; AnimationIter iter; gchar* common_parameters; self->animation = ANIMATION(g_object_ref(animation)); self->map = ITERATIVE_MAP(g_object_ref(map)); se...
false
false
false
false
false
0
x509_get_uid( unsigned char **p, const unsigned char *end, x509_buf *uid, int n ) { int ret; if( *p == end ) return( 0 ); uid->tag = **p; if( ( ret = asn1_get_tag( p, end, &uid->len, ASN1_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED | n ) )...
false
false
false
false
false
0
bfa_fcs_is_pbc_vport(struct bfa_fcs_vport_s *vport) { if (vport && (vport->lport.port_cfg.preboot_vp == BFA_TRUE)) return BFA_TRUE; else return BFA_FALSE; }
false
false
false
false
false
0
formatAndAppend(log4cplus::tostream& output, const log4cplus::spi::InternalLoggingEvent& event) { if (dateFormat.empty ()) formatRelativeTimestamp (output, event); else output << event.getTimestamp().getFormattedTime(dateFormat, use_gmtime); out...
false
false
false
false
false
0
_dbus_test(void *data __UNUSED__, DBusMessage *msg __UNUSED__, DBusError *error) { if ((error) && (dbus_error_is_set(error))) { dbus_error_free(error); if (dbus_handler) { e_dbus_signal_handler_del(dbus, dbus_handler); dbus_handler ...
false
false
false
false
false
0
get_relation_constraints(Oid relationObjectId, RelOptInfo *rel, bool include_notnull) { List *result = NIL; Index varno = rel->relid; Relation relation; TupleConstr *constr; /* * We assume the relation has already been safely locked. */ relation = heap_open(relationObjectId, NoLock); constr = re...
false
false
false
false
false
0
adebug(struct arena *a, int blocktype, MemDebug m, Pointer p) { struct block *b; Error rc; /* block which contains the memory manager data structs */ if (blocktype & MEMORY_PRIVATE) { rc = (*m)(MEMORY_PRIVATE, (Pointer)a, sizeof(struct arena), p); if (rc == ERROR) return rc; } /* normal...
false
false
false
false
false
0
weightmm(coef,di,ff,mi,gam) double *coef, di, *ff, gam; INT *mi; { double y1, y2, ip; ip = innerprod(ff,coef,mi[MP]); y1 = ip-gam*di; if (y1>0) return(y1/ip); y2 = ip+gam*di; if (y2<0) return(y2/ip); return(0.0); }
false
false
false
false
false
0
multipart_get_part (GMimeMultipart *multipart, int index) { GMimeObject *part; if ((guint) index >= multipart->children->len) return NULL; part = multipart->children->pdata[index]; return part; }
false
false
false
false
false
0
HandleCreatureCreate(Creature* creature) { // only handle summoned creatures if (!creature->IsTemporarySummon()) return; switch (creature->GetEntry()) { case NPC_HORSE: case NPC_BLACKSMITH_JASON_RIGGINS: case NPC_STABLE_MASTER_TIM: case NPC_VENDOR_ADAMS: ...
false
false
false
false
false
0
ReadList(struct FnCall *fp,struct Rlist *finalargs,enum cfdatatype type) { struct Rlist *rp,*newlist = NULL; struct Rval rval; char *filename,*comment,*split,fnname[CF_MAXVARSIZE]; int maxent,maxsize,noerrors = true,blanks = false; char *file_buffer = NULL; /* begin fn specific content */ /* 5args: file...
false
false
false
false
false
0
RenderVolumetricGeometry(vtkViewport *vp) { if ( this->Device ) { this->ComputeMatrix(); this->Device->SetUserMatrix(this->Matrix); return this->Device->RenderVolumetricGeometry(vp); } else { return 0; } }
false
false
false
false
false
0
Event_writeevents() /* * Field info: * E - event name * i - id * p - place * w - when * a - about * A - admin * @ - attendees * W - attendee when * C - attendee contact * t - time created */ { FILE *f; evntrec *event; attnrec *a; char tmpfile[256], eventfile[256]; int x; ...
false
false
false
false
true
1
scanfile(filename) char *filename; { int i, k, f, op, nrefs, flags; word id, procid; char *name; struct gentry *gp, **rp; makename(inname, SourceDir, filename, U1Suffix); infile = fopen(inname, "r"); if (infile == NULL) quitf("cannot open %s", inname); while ((op = getopc(&name)) != E...
false
false
false
false
false
0
_mesa_VDPAUUnmapSurfacesNV(GLsizei numSurfaces, const GLintptr *surfaces) { GET_CURRENT_CONTEXT(ctx); int i; if (!ctx->vdpDevice || !ctx->vdpGetProcAddress || !ctx->vdpSurfaces) { _mesa_error(ctx, GL_INVALID_OPERATION, "VDPAUUnmapSurfacesNV"); return; } for (i = 0; i < numSurfaces; ++i) { ...
false
false
false
false
true
1
sx150x_io_output(struct sx150x_chip *chip, unsigned offset, int val) { int err; err = sx150x_write_cfg(chip, offset, 1, chip->dev_cfg->reg_data, (val ? 1 : 0)); if (err >= 0) err = sx150x_write_cfg(chip, offset, 1, chip->dev_cfg->reg_dir, 0); return err; }
false
false
false
false
false
0
dJointGetPRParam( dJointID j, int parameter ) { dxJointPR* joint = ( dxJointPR* ) j; dUASSERT( joint, "bad joint argument" ); checktype( joint, PR ); if (( parameter & 0xff00 ) == 0x100 ) { return joint->limotR.get( parameter & 0xff ); } else { return joint->limotP.get( p...
false
false
false
false
false
0
hpsa_gather_lun_info(struct ctlr_info *h, struct ReportExtendedLUNdata *physdev, u32 *nphysicals, struct ReportLUNdata *logdev, u32 *nlogicals) { if (hpsa_scsi_do_report_phys_luns(h, physdev, sizeof(*physdev))) { dev_err(&h->pdev->dev, "report physical LUNs failed.\n"); return -1; } *nphysicals = be32_to_cpu(*...
false
false
false
false
false
0
lcp_input(unit, p, len) int unit; u_char *p; int len; { fsm *f = &lcp_fsm[unit]; if (f->flags & DELAYED_UP) { f->flags &= ~DELAYED_UP; untimeout(lcp_delayed_up, f); fsm_lowerup(f); } fsm_input(f, p, len); }
false
false
false
false
false
0
applicable0(const solver *ego_, const problem *p_, const planner *plnr, int *dp) { const S *ego = (const S *) ego_; const problem_rdft2 *p = (const problem_rdft2 *) p_; if (FINITE_RNK(p->vecsz->rnk) && p->vecsz->rnk > 0 && plnr->nthr > 1 && pickdim(ego, p->vecsz, p->r0 != p->cr, dp)) { ...
false
false
false
false
false
0
c_staticp (tree exp) { if (TREE_CODE (exp) == COMPOUND_LITERAL_EXPR && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp))) return 1; return 0; }
false
false
false
false
false
0
capincci_alloc_minor(struct capidev *cdev, struct capincci *np) { if (cdev->userflags & CAPIFLAG_HIGHJACKING) np->minorp = capiminor_alloc(&cdev->ap, np->ncci); }
false
false
false
false
false
0
control_message(uint16_t opcode, const void *data, uint16_t size) { switch (opcode) { case MGMT_EV_INDEX_ADDED: mgmt_index_added(size, data); break; case MGMT_EV_INDEX_REMOVED: mgmt_index_removed(size, data); break; case MGMT_EV_CONTROLLER_ERROR: mgmt_controller_error(size, data); break; case MGMT_EV_N...
false
false
false
false
false
0
bluehawk_draw_layer(struct mame_bitmap *bitmap,int gfx,const unsigned char *scroll, const unsigned char *tilemap,int transparency) { int offs; int scrollx,scrolly; scrollx = scroll[0] + (scroll[1] << 8); scrolly = scroll[3] + (scroll[4] << 8); for (offs = 0;offs < 0x100;offs += 2) { int sx,sy,cod...
false
false
false
false
false
0
print_to_txt() { int i; char str[1024], path[MAX_PATH_LENGTH]; FILE *outputfile; path[0] = 0; if(mainwindow->recent_savedir[0]!=0) { strcpy(path, mainwindow->recent_savedir); strcat(path, "/"); } strcat(path, "spectrum.txt"); strcpy(path, QFileDialog::getSaveFileName(0, "Export to ...
false
false
false
false
false
0
ImportNodes(xmlpp::Node *node, bool purge) { if( XmlNodeMapping *mapping = Find(node->get_path()) ) { mapping->AddNode(node); return; } xmlpp::Node::NodeList list = node->get_children(); xmlpp::Node::NodeList::iterator i = list.begin(); for( ; i != list.end(); ++i ) { ImportNodes(*i, false); } if( purge ...
false
false
false
false
false
0
centry_modify(sge_gdi_ctx_class_t *ctx, lList **answer_list, const char *name) { bool ret = true; DENTER(TOP_LAYER, "centry_modify"); if (name != NULL) { lListElem *centry = centry_get_via_gdi(ctx, answer_list, name); if (centry == NULL) { answer_list_add_sprintf(answer_list, STATUS_ERRO...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); PrinterPreviewerPrivate *_t = static_cast<PrinterPreviewerPrivate *>(_o); switch (_id) { case 0: _t->on_updatePreviewButton_clic...
false
false
false
false
false
0
main(int argc, char **argv) { char *progname = argv[0]; // line-buffered stdout setvbuf(stdout, NULL, _IOLBF, 0); exec_options eo; eo.verbose = 0; eo.offset_format_type = offset_format_block_count; eo.part_format_type = part_format_talkative; eo.start_block = 0; eo.has_end_block = ...
false
true
true
false
true
1
SendMove(const BaseRootQuery* inRootQuery, ULConnectionCallback* inCallback) { if (mConnection == NULL) { gdcmErrorMacro( "mConnection is NULL" ); return false; } std::vector<BasePDU*> theDataPDU = PDUFactory::CreateCMovePDU( *mConnection, inRootQuery ); ULEvent theEvent(ePDATArequest, theDataPD...
false
false
false
false
false
0
CP9AllocTrace(int tlen, CP9trace_t **ret_tr) { int status; CP9trace_t *tr; ESL_ALLOC(tr, sizeof(CP9trace_t)); ESL_ALLOC(tr->statetype, sizeof(char) * tlen); ESL_ALLOC(tr->nodeidx, sizeof(int) * tlen); ESL_ALLOC(tr->pos, sizeof(int) * tlen); *ret_tr = tr; return; ERROR: cm_Fail("Memory a...
false
true
false
false
false
1
gnac_profiles_utils_add_description_tooltip(BasicFormatInfo *bfi, const gchar *xpath_query, ...) { gchar *description = gnac_profiles_xml_engine_get_text_node(bfi->doc, xpath_query); if (!description) { libgnac_war...
false
false
false
false
false
0
ftrace_shutdown_sysctl(void) { int command; if (unlikely(ftrace_disabled)) return; /* ftrace_start_up is true if ftrace is running */ if (ftrace_start_up) { command = FTRACE_DISABLE_CALLS; if (ftrace_graph_active) command |= FTRACE_STOP_FUNC_RET; ftrace_run_update_code(command); } }
false
false
false
false
false
0
sanei_usb_get_vendor_product (SANE_Int dn, SANE_Word * vendor, SANE_Word * product) { SANE_Word vendorID = 0; SANE_Word productID = 0; if (dn >= device_number || dn < 0) { DBG (1, "sanei_usb_get_vendor_product: dn >= device number || dn < 0\n"); return SANE_STATUS_INVAL; } if (dev...
false
false
false
false
false
0
seaudit_filter_t_set_date(seaudit_filter_t *self,tm_t *start,tm_t *end,seaudit_filter_date_match_e match){ BEGIN_EXCEPTION if (seaudit_filter_set_date(self, start, end, match)) { {tcl_throw_error("Could not set date for filter"); goto fail;}; } END_EXCEPTION fail: return; }
false
false
false
false
false
0
dht_getxattr_unwind (call_frame_t *frame, int op_ret, int op_errno, dict_t *dict) { DHT_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict); return 0; }
false
false
false
false
false
0
draw() { int offset; if ( uses_bmaps ) { if ( disabled_flag ) { if ( flag ) { if ( bmap_ids[RADIO_DISABLED_MARKED] != -1 ) { gr_set_bitmap(bmap_ids[RADIO_DISABLED_MARKED]); gr_bitmap(x,y); } } else { if ( bmap_ids[RADIO_DISABLED_CLEAR] != -1 ) { gr_set_bitmap(bmap_ids[RADIO_DI...
false
false
false
false
false
0
QueryGeometry(Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply) { XmTabWidget wid = (XmTabWidget)w; XtGeometryResult ret_val = XtGeometryNo; reply->request_mode = 0; if (request->request_mode & CWX ) { reply->request_mode |= CWX; reply->x ...
false
false
false
false
false
0
load_config(void) { char *opt; opt = conf_get_opt("radius", "max-try"); if (opt && atoi(opt) > 0) conf_max_try = atoi(opt); opt = conf_get_opt("radius", "timeout"); if (opt && atoi(opt) > 0) conf_timeout = atoi(opt); opt = conf_get_opt("radius", "acct-timeout"); if (opt && atoi(opt) >= 0) conf_acct_tim...
false
false
false
false
false
0
parseFlags(std::ostream& str, std::string::const_iterator& itFmt, const std::string::const_iterator& endFmt) { bool isFlag = true; while (isFlag && itFmt != endFmt) { switch (*itFmt) { case '-': str.setf(std::ios::left); ++itFmt; break; case '+': str.setf(std::ios::showpos); ++itFmt; break; case '...
false
false
false
false
false
0
DoLoadGlobalCell(HLoadGlobalCell* instr) { LLoadGlobalCell* result = new LLoadGlobalCell; return instr->check_hole_value() ? AssignEnvironment(DefineAsRegister(result)) : DefineAsRegister(result); }
false
false
false
false
false
0
daud_write_header(struct AVFormatContext *s) { AVCodecContext *codec = s->streams[0]->codec; if (codec->channels!=6 || codec->sample_rate!=96000) return -1; return 0; }
false
false
false
false
false
0
mono_string_hash (MonoString *s) { const guint16 *p = mono_string_chars (s); int i, len = mono_string_length (s); guint h = 0; for (i = 0; i < len; i++) { h = (h << 5) - h + *p; p++; } return h; }
false
false
false
false
false
0
gst_interpolation_control_source_reset (GstInterpolationControlSource * self) { GstControlSource *csource = (GstControlSource *) self; csource->get_value = NULL; csource->get_value_array = NULL; self->priv->type = self->priv->base = G_TYPE_INVALID; if (G_IS_VALUE (&self->priv->default_value)) g_value_u...
false
false
false
false
false
0
DCD_GetEPStatus(USB_OTG_CORE_HANDLE *pdev ,uint8_t epnum) { USB_OTG_EP *ep; uint32_t Status = 0; if ((0x80 & epnum) == 0x80) { ep = &pdev->dev.in_ep[epnum & 0x7F]; } else { ep = &pdev->dev.out_ep[epnum]; } Status = USB_OTG_GetEPStatus(pdev ,ep); /* Return the cur...
false
false
false
false
false
0
antoi( char *src, int offset, int len ) { int pow = 1, res = 0; if( len < 0 ) { return( -1 ); } while( --len != -1 ) { if( !isdigit( src[offset+len] ) ) { res = -1; break; } else { res += ( src[offset+len] - '0' ) * pow ; pow *= 10; } } return( res ); }
false
false
false
false
false
0
program() const { if (cff) return cff; else { if (!_ttb_program) _ttb_program = new Efont::TrueTypeBoundsCharstringProgram(otf); return _ttb_program; } }
false
false
false
false
false
0
operator delete( void * ptr) { if( !ptr) { return; } flmAssert( ((FlmRecord *)ptr)->m_refCnt == 0); gv_FlmSysData.RCacheMgr.pRecAlloc->freeCell( ptr); }
false
false
false
false
false
0
make_isakmp_hdr(unsigned xchg, unsigned next, unsigned length, int header_version, int hdr_flags, unsigned hdr_msgid, unsigned char *rcookie_data, size_t rcookie_data_len) { unsigned char *payload; struct isakmp_hdr* hdr; payload = Malloc(sizeof(struct isakmp_hdr)); hdr = (s...
false
true
false
false
false
1
Find(const Results &results, Barry::Pin pin) { Barry::Probe::Results::const_iterator ci = results.begin(); for( int i = 0; ci != results.end(); i++, ++ci ) { if( ci->m_pin == pin ) return i; } // PIN not found return -1; }
false
false
false
false
false
0
Vindex_ref(int32 file_id, int32 sear_index) { int32 find_ref = -1; int index = 0; intn found = FALSE; int32 ret_value = FAIL; while (!found && index != -1) { find_ref = Vgetid(file_id, find_ref); /* Searched ref# doesn't exist */ if (find_ref == FAIL) index = -1; ...
false
false
false
false
false
0
cum_biv_norm_dist1 (gnm_float a, gnm_float b, gnm_float rho) { gnm_float rho1, rho2, delta; gnm_float a1, b1, sum = 0.0; int i, j; static const gnm_float x[] = {0.24840615, 0.39233107, 0.21141819, 0.03324666, 0.00082485334}; static const gnm_float y[] = {0.10024215, 0.48281397, 1.0609498, 1.7797294, 2.6697604}; ...
false
false
false
false
false
0
replace_history_entry (which, line, data) int which; const char *line; histdata_t data; { HIST_ENTRY *temp, *old_value; if (which < 0 || which >= history_length) return ((HIST_ENTRY *)NULL); temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); old_value = the_history[which]; temp->line = ...
false
false
false
false
false
0
enough_swap(unsigned int nr_pages, unsigned int flags) { unsigned int free_swap = count_swap_pages(root_swap, 1); unsigned int required; pr_debug("PM: Free swap pages: %u\n", free_swap); required = PAGES_FOR_IO + nr_pages; return free_swap > required; }
false
false
false
false
false
0
win_textbuffer_rearrange(window_t *win, rect_t *box) { window_textbuffer_t *dwin = win->data; int newwid, newhgt; int rnd; int i; dwin->owner->bbox = *box; newwid = (box->x1 - box->x0 - gli_tmarginx * 2 - gli_scroll_width) / gli_cellw; newhgt = (box->y1 - box->y0 - gli_tmarginy *...
false
false
false
false
false
0