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
tp_protocol_check_for_core (TpProtocol *self) { const GHashTable *props = self->priv->protocol_properties; const GValue *value; /* this one can legitimately be NULL so we need to be more careful */ value = tp_asv_lookup (props, TP_PROP_PROTOCOL_CONNECTION_INTERFACES); if (value == NULL || !G_VALUE_HOLDS (va...
false
false
false
false
false
0
name_addmultibytechar( newstr *s, char *p, char *lastp ) { if ( ! ((*p) & 128) ) { newstr_addchar( s, *p ); p++; } else { while ( p!=lastp && ((*p) & 128) ) { newstr_addchar( s, *p ); p++; } } return p; }
false
false
false
false
false
0
smp_fetch_meth(struct proxy *px, struct session *l4, void *l7, unsigned int opt, const struct arg *args, struct sample *smp, const char *kw) { int meth; struct http_txn *txn = l7; CHECK_HTTP_MESSAGE_FIRST_PERM(); meth = txn->meth; smp->type = SMP_T_METH; smp->data.meth.meth = meth; if (meth == H...
false
false
false
false
false
0
find_filesdoneproc (void *callerdat, int err, const char *repository, const char *update_dir, List *entries) { struct find_data *find_data = callerdat; find_data->repository = repository; /* if this directory has an ignore list, process it then free it */ if (find_data->ignlist) ...
false
false
false
false
false
0
uabort () { if (fLocked_system) ufailed (&sDaemon); ulog_user ((const char *) NULL); if (qConn != NULL) { (void) fconn_close (qConn, pUuconf, (struct uuconf_dialer *) NULL, FALSE); (void) fconn_unlock (qConn); uconn_free (qConn); } if (fLocked_system) { (void) fsy...
false
false
false
false
false
0
curses_string (Driver *drvthis, int x, int y, const char string[]) { PrivateData *p = drvthis->private_data; if ((x <= 0) || (y <= 0) || (x > p->width) || (y > p->height)) return; if (!p->drawBorder) { x--; y--; } mvwaddstr(p->win, y, x, string); }
false
false
false
false
false
0
xmmsc_ipc_exec_msg (xmmsc_ipc_t *ipc, xmms_ipc_msg_t *msg) { xmmsc_result_t *res; res = xmmsc_ipc_result_lookup (ipc, xmms_ipc_msg_get_cookie (msg)); if (!res) { xmms_ipc_msg_destroy (msg); return; } xmmsc_result_run (res, msg); }
false
false
false
false
false
0
mls_level_isvalid(struct policydb *p, struct mls_level *l) { struct level_datum *levdatum; if (!l->sens || l->sens > p->p_levels.nprim) return 0; levdatum = hashtab_search(p->p_levels.table, sym_name(p, SYM_LEVELS, l->sens - 1)); if (!levdatum) return 0; /* * Return 1 iff all the bits set in l->cat a...
false
false
false
false
false
0
hid_irq_in(struct urb *urb) { struct hid_device *hid = urb->context; struct usbhid_device *usbhid = hid->driver_data; int status; switch (urb->status) { case 0: /* success */ usbhid_mark_busy(usbhid); usbhid->retry_delay = 0; if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open) break; if (!tes...
false
false
false
false
false
0
bnx2x_func_send_start(struct bnx2x *bp, struct bnx2x_func_state_params *params) { struct bnx2x_func_sp_obj *o = params->f_obj; struct function_start_data *rdata = (struct function_start_data *)o->rdata; dma_addr_t data_mapping = o->rdata_mapping; struct bnx2x_func_start_params *start_params = &params->params...
false
false
false
false
false
0
sinfo_new_object_assign_offset(const char* name, const int n, double* ref_offx, double* ref_offy, float** offsetx, float** offsety) { float offx=0; float offy=0...
false
false
false
false
false
0
obj_nvstore_get_state_writestclear(TSS_HNVSTORE hNvstore, UINT32 * writestclear) { BYTE nv_data_public[MAX_PUBLIC_DATA_SIZE]; UINT32 data_public_size = MAX_PUBLIC_DATA_SIZE; UINT32 offset; UINT16 pcrread_sizeOfSelect; UINT16 pcrwrite_sizeOfSelect; TPM_BOOL value; TSS_RESULT result; if ((result = obj_nvstore_ge...
false
false
false
false
false
0
soc_tplg_denum_create_texts(struct soc_enum *se, struct snd_soc_tplg_enum_control *ec) { int i, ret; se->dobj.control.dtexts = kzalloc(sizeof(char *) * ec->items, GFP_KERNEL); if (se->dobj.control.dtexts == NULL) return -ENOMEM; for (i = 0; i < ec->items; i++) { if (strnlen(ec->texts[i], SNDRV_CTL_ELEM_ID...
false
false
false
false
false
0
igb_ndo_set_vf_spoofchk(struct net_device *netdev, int vf, bool setting) { struct igb_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; u32 reg_val, reg_offset; if (!adapter->vfs_allocated_count) return -EOPNOTSUPP; if (vf >= adapter->vfs_allocated_count) return -EINVAL; re...
false
false
false
false
false
0
ncp_symlink_readpage(struct file *file, struct page *page) { struct inode *inode = page->mapping->host; int error, length, len; char *link, *rawlink; char *buf = kmap(page); error = -ENOMEM; rawlink = kmalloc(NCP_MAX_SYMLINK_SIZE, GFP_KERNEL); if (!rawlink) goto fail; if (ncp_make_open(inode,O_RDONLY)) go...
false
false
false
false
false
0
on_button_formatting() { //TODO: Abstract this into the base class: //Get the selected item: Glib::RefPtr<Gtk::TreeSelection> refTreeSelection = m_treeview_fields->get_selection(); if(refTreeSelection) { Gtk::TreeModel::iterator iter = refTreeSelection->get_selected(); if(iter) { Gtk::TreeM...
false
false
false
false
false
0
dfb_windowstack_cursor_set_opacity( CoreWindowStack *stack, u8 opacity ) { D_DEBUG_AT( Core_WindowStack, "%s( %p, 0x%02x )\n", __FUNCTION__, stack, opacity ); D_MAGIC_ASSERT( stack, CoreWindowStack ); /* Lock the window stack. */ if (dfb_windowstack_lock( stack )) return DFB_FUSION; ...
false
false
false
false
false
0
scsiback_tpg_nexus_show(struct config_item *item, char *page) { struct se_portal_group *se_tpg = to_tpg(item); struct scsiback_tpg *tpg = container_of(se_tpg, struct scsiback_tpg, se_tpg); struct scsiback_nexus *tv_nexus; ssize_t ret; mutex_lock(&tpg->tv_tpg_mutex); tv_nexus = tpg->tpg_nexus; if (!tv_nexus)...
false
false
false
false
false
0
showexons(GthSA *sa, unsigned int indentlevel, GtFile *outfp) { Exoninfo *exoninfo; unsigned long i; for (i = 0; i < gth_sa_num_of_exons(sa); i++) { exoninfo = gth_sa_get_exon(sa, i); gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<exoninfo>\n"); indentlevel++; ...
false
false
false
false
false
0
GetWindowProperty (Atom type, Atom **args, unsigned long *nitems) { int format = 0; unsigned long bytesafter = 0; int ret = 0; XLockDisplay(_display); ret = (Success == XGetWindowProperty (_display, _rootWindow, type, 0, 16384, false, AnyPr...
false
false
false
false
false
0
sqlite3ExprResolveNames( NameContext *pNC, /* Namespace to resolve expressions in. */ Expr *pExpr /* The expression to be analyzed. */ ){ int savedHasAgg; if( pExpr==0 ) return 0; savedHasAgg = pNC->hasAgg; pNC->hasAgg = 0; walkExprTree(pExpr, nameResolverStep, pNC); if( pNC->nErr>0 ){...
false
false
false
false
false
0
test_segment_field_index_single_field(tst_case *tc, void *data) { int i; Store *store = (Store *)data; SegmentFieldIndex *sfi; SegmentTermIndex *sti; TermInfosWriter *tiw = tiw_open(store, "_0", 32, SKIP_INTERVAL); tiw_start_field(tiw, 0); for (i = 0; i < DICT_LEN; i++) { TermInfo ...
false
false
false
false
false
0
clutter_score_stop (ClutterScore *score) { ClutterScorePrivate *priv; g_return_if_fail (CLUTTER_IS_SCORE (score)); priv = score->priv; if (priv->running_timelines) { g_hash_table_foreach (priv->running_timelines, foreach_running_timeline, GINT...
false
false
false
false
false
0
scroll_type_apply(ob_methods *context, object *scroll, object *applier, int aflags) { object *skapplier; object *head; sstring name; head = HEAD(applier); if (QUERY_FLAG(applier, FLAG_BLIND) && !QUERY_FLAG(applier, FLAG_WIZ)) { draw_ext_info(NDI_UNIQUE, 0, applier, MSG_TYPE_APPLY, MSG_...
false
false
false
false
false
0
parseTimezone(const char *zDate, DateTime *p){ int sgn = 0; int nHr, nMn; while( isspace(*zDate) ){ zDate++; } p->tz = 0; if( *zDate=='-' ){ sgn = -1; }else if( *zDate=='+' ){ sgn = +1; }else{ return *zDate!=0; } zDate++; if( getDigits(zDate, 2, 0, 14, ':', &nHr, 2, 0, 59, 0, &nMn)!=2 ){...
false
false
false
false
false
0
findDebugLoc(MachineBasicBlock::iterator &MBBI) { DebugLoc DL; MachineBasicBlock::iterator E = end(); if (MBBI != E) { // Skip debug declarations, we don't want a DebugLoc from them. MachineBasicBlock::iterator MBBI2 = MBBI; while (MBBI2 != E && MBBI2->isDebugValue()) MBBI2++; if (MBBI2 != E...
false
false
false
false
false
0
amd_ir_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) { struct amd_ir_data *ir_data = data->chip_data; struct irq_2_irte *irte_info = &ir_data->irq_2_irte; struct irq_cfg *cfg = irqd_cfg(data); struct irq_data *parent = data->parent_data; int ret; ret = parent->chip->irq_se...
false
false
false
false
false
0
file_object_alloc(const int fd, const char * const pathname, int accmode) { static const struct file_object zero_fo; struct file_object *fo; hikset_t *ht; g_return_val_if_fail(fd >= 0, NULL); g_return_val_if_fail(pathname, NULL); g_return_val_if_fail(is_absolute_path(pathname), NULL); g_return_val_if_fail(!file...
false
false
false
false
false
0
set (unsigned long options, const ACE_Time_Value &timeout, const void *arg) { // ACE_TRACE ("ACE_Synch_Options::set"); this->options_ = options; this->timeout_ = timeout; // Whoa, possible dependence on static initialization here. This // function is called du...
false
false
false
false
false
0
UT_getAttribute( const PP_AttrProp* pAP, const char* name, const char* def ) { const gchar* pValue; bool ok; ok = pAP->getAttribute( name, pValue ); if (!ok) { pValue = def; } return pValue; }
false
false
false
false
false
0
SafeRead(HSQUIRRELVM v,SQWRITEFUNC read,SQUserPointer up,SQUserPointer dest,SQInteger size) { if(size && read(up,dest,size) != size) { v->Raise_Error(_SC("io error, read function failure, the origin stream could be corrupted/trucated")); return false; } return true; }
false
false
false
false
false
0
print(FILE *fp) { char sFrom[16]; char sTo[16]; if(reg) fprintf(fp, " Option: from 0x%s to 0x%s\n", from.toString(sFrom,sizeof(sFrom)), to.toString(sTo,sizeof(sTo))); } }
false
false
false
false
false
0
gen_query_cpu_unit (def) rtx def; { decl_t decl; char **str_cpu_units; int vect_length; int i; str_cpu_units = get_str_vect ((char *) XSTR (def, 0), &vect_length, ',', 0); if (str_cpu_units == NULL) fatal ("invalid string `%s' in define_query_cpu_unit", XSTR (def, 0)); for (i = 0; i < vect_lengt...
false
false
false
false
false
0
mips64_clear_irq(cpu_mips_t *cpu,m_uint8_t irq) { m_uint32_t m; m = (1 << (irq + MIPS_CP0_CAUSE_ISHIFT)) & MIPS_CP0_CAUSE_IMASK; atomic_and(&cpu->irq_cause,~m); if (!cpu->irq_cause) cpu->irq_pending = 0; }
false
false
false
false
false
0
NsInitFd(void) { #ifndef _WIN32 struct rlimit rl; #endif int fd; /* * Ensure fd 0, 1, and 2 are open on at least /dev/null. */ fd = open(DEVNULL, O_RDONLY); if (fd > 0) { close(fd); } fd = open(DEVNULL, O_WRONLY); if (fd > 0 && fd != 1) { close(fd); } fd = ope...
false
false
false
false
false
0
multixact_desc(StringInfo buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; if (info == XLOG_MULTIXACT_ZERO_OFF_PAGE) { int pageno; memcpy(&pageno, rec, sizeof(int)); appendStringInfo(buf, "zero offsets page: %d", pageno); } else if (info == XLOG_MULTIXACT_ZERO_MEM_PAGE) { int ...
false
false
false
false
true
1
scan_address( char * ip_addr, size_t addr_size, char * ip_mode, size_t mode_size, const char * s ) { int retval = -1; char * p; if ( ( NULL == s ) || ( NULL == ip_addr) ) { return -1; } memset(ip_addr, 0, addr_size); p = strpbrk(s,...
false
false
false
false
false
0
getMEAtScore(const int nScore0, const int nScore1, const int nMatchTo, const int fPlayer, const int fCrawford, float aafMET[MAXSCORE][MAXSCORE], float aafMETPostCrawford[2][MAXSCORE]) { int n0 = nMatchTo - nScore0 - 1; int n1 = nMatchTo - nScore1 - 1; /* check if any player has w...
false
false
false
false
false
0
ivtv_g_fmt_sliced_vbi_out(struct file *file, void *fh, struct v4l2_format *fmt) { struct ivtv *itv = fh2id(fh)->itv; struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; vbifmt->reserved[0] = 0; vbifmt->reserved[1] = 0; if (!(itv->v4l2_cap & V4L2_CAP_SLICED_VBI_OUTPUT)) return -EINVAL; vbifmt->io_size = s...
false
false
false
false
false
0
eeprom_write_with_enable(struct qib_devdata *dd, u8 offset, const void *buf, int len) { int ret, pwen; pwen = dd->f_eeprom_wen(dd, 1); ret = qib_twsi_reset(dd); if (ret) qib_dev_err(dd, "EEPROM Reset for write failed\n"); else ret = qib_twsi_blk_wr(dd, dd->twsi_eeprom_dev, offset, buf, len); ...
false
false
false
false
false
0
mvumi_match_devices(struct mvumi_hba *mhba, int id, u64 wwid) { struct mvumi_device *mv_dev = NULL; list_for_each_entry(mv_dev, &mhba->shost_dev_list, list) { if (mv_dev->wwid == wwid) { if (mv_dev->id != id) { dev_err(&mhba->pdev->dev, "%s has same wwid[%llx] ," " but different id[%d %d]\n", ...
false
false
false
false
false
0
cx231xx_v4l2_poll(struct file *filp, poll_table *wait) { unsigned long req_events = poll_requested_events(wait); struct cx231xx_fh *fh = filp->private_data; struct cx231xx *dev = fh->dev; unsigned res = 0; int rc; rc = check_dev(dev); if (rc < 0) return POLLERR; rc = res_get(fh); if (unlikely(rc < 0)) r...
false
false
false
false
false
0
dockChangeActivation(bool activate, QWidget * originator) { Q_UNUSED(activate); Q_UNUSED(originator); if (!m_closing) { m_sizeGrip->rearrange(); } }
false
false
false
false
false
0
get_result_vector(struct i915_fragment_program *p, const struct prog_instruction *inst) { switch (inst->DstReg.File) { case PROGRAM_OUTPUT: switch (inst->DstReg.Index) { case FRAG_RESULT_COLOR: case FRAG_RESULT_DATA0: return UREG(REG_TYPE_OC, 0); case FRAG_RESULT...
false
false
false
false
false
0
__remove(struct device *dev) { struct osd_uld_device *oud = container_of(dev, struct osd_uld_device, class_dev); struct scsi_device *scsi_device = oud->od.scsi_device; kfree(oud->odi.osdname); if (oud->cdev.owner) cdev_del(&oud->cdev); osd_dev_fini(&oud->od); scsi_device_put(scsi_device); OSD_INFO(...
false
false
false
false
false
0
mv88e6xxx_lookup_name(struct device *host_dev, int sw_addr, const struct mv88e6xxx_switch_id *table, unsigned int num) { struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev); int i, ret; if (!bus) return NULL; ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), PORT_SWITCH_ID); if (ret < 0) ...
false
false
false
false
false
0
requestSample(const QUrl& url) { if (!m_loadingThread.isRunning()) m_loadingThread.start(); #ifdef QT_SAMPLECACHE_DEBUG qDebug() << "QSampleCache: request sample [" << url << "]"; #endif QMutexLocker locker(&m_mutex); QMap<QUrl, QSample*>::iterator it = m_samples.find(url); QSample* sample; ...
false
false
false
false
false
0
camlidl_tcons1_ap_tcons1_array_extend_environment( value _v_array, value _v_env) { struct ap_tcons1_array_t array; /*in*/ ap_environment_ptr env; /*in*/ struct ap_tcons1_array_t _res; value _vres; struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL }; camlidl_ctx _ctx = &_ctxs; camlidl_ml2c_tco...
false
false
false
false
false
0
xfs_bstime_store_compat( compat_xfs_bstime_t __user *p32, const xfs_bstime_t *p) { __s32 sec32; sec32 = p->tv_sec; if (put_user(sec32, &p32->tv_sec) || put_user(p->tv_nsec, &p32->tv_nsec)) return -EFAULT; return 0; }
false
false
false
false
false
0
main(int argc, char **argv) { int count, status, goal = argc; state *s; TCHAR *fn, *cwd; #ifndef __GLIBC__ __progname = basename(argv[0]); #endif s = (state *)malloc(sizeof(state)); if (NULL == s) fatal_error("%s: Unable to allocate state variable", __progname); if (initialize_state(s)) fatal_...
false
false
false
false
false
0
ocfs2_unlock_global_qf(struct ocfs2_mem_dqinfo *oinfo, int ex) { if (ex) { up_write(&OCFS2_I(oinfo->dqi_gqinode)->ip_alloc_sem); mutex_unlock(&oinfo->dqi_gqinode->i_mutex); } else { up_read(&OCFS2_I(oinfo->dqi_gqinode)->ip_alloc_sem); } ocfs2_inode_unlock(oinfo->dqi_gqinode, ex); brelse(oinfo->dqi_gqi_bh); ...
false
false
false
false
false
0
show_partition_start(struct seq_file *seqf, loff_t *pos) { void *p; p = disk_seqf_start(seqf, pos); if (!IS_ERR_OR_NULL(p) && !*pos) seq_puts(seqf, "major minor #blocks name\n\n"); return p; }
false
false
false
false
false
0
pp_cxx_simple_type_specifier (cxx_pretty_printer *pp, tree t) { switch (TREE_CODE (t)) { case RECORD_TYPE: case UNION_TYPE: case ENUMERAL_TYPE: pp_cxx_qualified_id (pp, t); break; case TEMPLATE_TYPE_PARM: case TEMPLATE_TEMPLATE_PARM: case TEMPLATE_PARM_INDEX: pp_cxx_unqu...
false
false
false
false
false
0
CollectPhotonsInBox(const BoundingBox &bb, std::vector<Photon> &photons) const { // explicitly store the queue of cells that must be checked (rather // than write a recursive function) std::vector<const KDTree*> todo; todo.push_back(this); while (!todo.empty()) { const KDTree *node = todo.back(); to...
false
false
false
false
false
0
hdspm_pref_sync_ref(struct hdspm * hdspm) { switch (hdspm->io_type) { case AES32: switch (hdspm->control_register & HDSPM_SyncRefMask) { case 0: return 0; /* WC */ case HDSPM_SyncRef0: return 1; /* AES 1 */ case HDSPM_SyncRef1: return 2; /* AES 2 */ case HDSPM_SyncRef1+HDSPM_SyncRef0: return 3; /* AES 3 */...
false
false
false
false
false
0
VasyAllianceTreatVexAtomDontCare( VexAtom ) vexexpr *VexAtom; { char *Value; int Index; char Char; Value = GetVexAtomValue( VexAtom ); for ( Index = 0; Value[ Index ] != '\0'; Index++ ) { Char = Value[ Index ]; if ( ( Char != '0' ) && ( Char != '1' ) && ( Char != '\'' ...
false
false
false
false
false
0
recovery_action(double now) { unsigned int i; int retval; if (data_now_present) { status = PRESENT; } if (debug_status) { printf(" meta chunk %s: status %s have_unrec_children %d\n", name, status_str(status), have_unrecoverable_children ); } for (i=0; i...
false
false
false
false
false
0
isl_ast_build_restrict( __isl_take isl_ast_build *build, __isl_take isl_set *set) { if (isl_set_is_params(set)) return isl_ast_build_restrict_generated(build, set); if (isl_ast_build_need_schedule_map(build)) { isl_multi_aff *ma; ma = isl_ast_build_get_schedule_map_multi_aff(build); set = isl_set_preimage_m...
false
false
false
false
false
0
au_si_alloc(struct super_block *sb) { int err, i; struct au_sbinfo *sbinfo; static struct lock_class_key aufs_si; err = -ENOMEM; sbinfo = kzalloc(sizeof(*sbinfo), GFP_NOFS); if (unlikely(!sbinfo)) goto out; BUILD_BUG_ON(sizeof(unsigned long) != sizeof(*sbinfo->au_si_pid.bitmap)); sbinfo->au_si_pid.bi...
false
false
false
false
false
0
init_hypervisor_platform(void) { detect_hypervisor_vendor(); if (!x86_hyper) return; init_hypervisor(&boot_cpu_data); if (x86_hyper->init_platform) x86_hyper->init_platform(); }
false
false
false
false
false
0
xml_needs_escape(const char *str, int *escaped_length) { int esc_len = 0; int escape = 0; if (!str) return 0; for (const char *c = str; *c; c++) { switch (*c) { case '<': esc_len += 4; escape = 1; break; case '>': esc_len += 4; escape = 1; break; case '&': esc_len += 5; ...
false
false
false
false
false
0
OGRGeocodeMakeRawLayer(const char* pszContent) { OGRMemLayer* poLayer = new OGRMemLayer( "result", NULL, wkbNone ); OGRFeatureDefn* poFDefn = poLayer->GetLayerDefn(); OGRFieldDefn oFieldDefnRaw("raw", OFTString); poLayer->CreateField(&oFieldDefnRaw); OGRFeature* poFeature = new OGRFeature(poFDefn); ...
false
false
false
false
false
0
full_next_move (board_t * board, split_t * split, int * value, int thread) { int move; ASSERT(board!=NULL); ASSERT(split!=NULL); ASSERT(value!=NULL); ASSERT(thread_is_ok(thread)); // end if (split->end || thread_is_stop(thread)) return MoveNone; // init split->sort->board = board; // HA...
false
false
false
false
false
0
rinoo_socket_sendfile(t_socket *socket, int in_fd, off_t offset, size_t count) { if (unlikely(socket->class->sendfile == NULL)) { void *ptr; int pagesize; ssize_t result; t_buffer dummy; pagesize = getpagesize(); ptr = mmap(NULL, count + (offset % pagesize), PROT_READ, MAP_PRIVATE, in_fd, pagesize * (offs...
false
false
false
false
false
0
dm_btree_lookup_next(struct dm_btree_info *info, dm_block_t root, uint64_t *keys, uint64_t *rkey, void *value_le) { unsigned level; int r = -ENODATA; __le64 internal_value_le; struct ro_spine spine; init_ro_spine(&spine, info); for (level = 0; level < info->levels - 1u; level++) { r = btree_lookup_raw(&spi...
false
false
false
false
false
0
cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */ { char filename[1024], /* Filename */ locale[16], /* Locale name */ *locptr; /* Pointer into locale name */ const char *directory, /* Directory for templates */ *lang; /* Language */ FILE *in; /* Input file */ fprintf(stderr, "DEBUG...
false
false
false
false
false
0
curr_dual_frac_to_the_bound(Number tau) { DBG_START_METH("IpoptCalculatedQuantities::curr_dual_frac_to_the_bound()", dbg_verbosity); return dual_frac_to_the_bound(tau, *ip_data_->delta()->z_L(), *ip_data_->delta()->z_U(), *...
false
false
false
false
false
0
G_Read(WamWord gvar_word, WamWord gval_word) { GTarget *gt = Get_Target_From_Gvar(gvar_word); GVarElt *g_elem = gt->g_elem; WamWord *g_arg = gt->g_arg; WamWord word; if (g_arg != NULL) { Copy_Term(H, g_arg); word = *H; H += Term_Size(word); return Unify(word, gval_word); } ...
false
false
false
false
false
0
file_uncompress(file) char *file; { local char buf[MAX_NAME_LEN]; char *infile, *outfile; FILE *out; gzFile in; uInt len = (uInt)strlen(file); strcpy(buf, file); if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { infile = file; outfile = buf; ...
false
false
false
false
true
1
accept() { QDialog::accept(); int lineno = ui.spinBox->value(); QTextDocument *d = editor->document(); QTextCursor c = editor->textCursor(); QTextBlock b = d->findBlockByNumber(lineno-1); if (b.isValid()) { c.setPosition(b.position()); editor->setTextCursor(c); editor->ensureCursorVisi...
false
false
false
false
false
0
ReadArrayString(const wxString& name) { wxArrayString as; Read(name, &as); return as; }
false
false
false
false
false
0
do_tsinfo(struct cmd_context *ctx) { struct ethtool_ts_info info; if (ctx->argc != 0) exit_bad_args(); fprintf(stdout, "Time stamping parameters for %s:\n", ctx->devname); info.cmd = ETHTOOL_GET_TS_INFO; if (send_ioctl(ctx, &info)) { perror("Cannot get device time stamping settings"); return -1; } dump_t...
false
false
false
false
false
0
tenFiberTrace(tenFiberContext *tfx, Nrrd *nfiber, double seed[3]) { static const char me[]="tenFiberTrace"; if (_fiberTraceSet(tfx, NULL, nfiber, NULL, 0, NULL, NULL, seed)) { biffAddf(TEN, "%s: problem computing tract", me); return 1; } return 0; }
false
false
false
false
false
0
__db_pget(dbp, ip, txn, skey, pkey, data, flags) DB *dbp; DB_THREAD_INFO *ip; DB_TXN *txn; DBT *skey, *pkey, *data; u_int32_t flags; { DBC *dbc; u_int32_t mode; int ret, t_ret; mode = DB_CURSOR_TRANSIENT; if (LF_ISSET(DB_READ_UNCOMMITTED)) { mode |= DB_READ_UNCOMMITTED; LF_CLR(DB_READ_UNCOMMITTED); } el...
false
false
false
false
false
0
spring_trap(object *trap, object *victim) { object *env; tag_t trap_tag = trap->count; rv_vector rv; int i, has_spell; /* Prevent recursion */ if (trap->stats.hp <= 0) return; if (QUERY_FLAG(trap, FLAG_IS_LINKED)) use_trigger(trap); /* Check if this trap casts a spell ...
false
false
false
false
false
0
getFontList() { QList<QVariant> flv; GLEInterface* iface = getGLEInterface(); int nbfonts = iface->getNumberOfFonts(); for (int i = 0; i < nbfonts; i++) { GLEFont* font = iface->getFont(i); flv.push_back(QString::fromUtf8(font->getFullNameC())); // cout << "FONT: " << font->getFullNameC() << " -> " << i << en...
false
false
false
false
false
0
get_hard_limits( struct pp_hwmgr *hwmgr, struct phm_clock_and_voltage_limits *limits, const ATOM_Tonga_Hard_Limit_Table * limitable ) { PP_ASSERT_WITH_CODE((0 != limitable->ucNumEntries), "Invalid PowerPlay Table!", return -1); /* currently we always take entries[0] parameters */ limits->sclk = (uint32_t)li...
false
false
false
false
false
0
table_iter_get_strs(HTableIterator iterator, int *err) { if ((! iterator) || (! iterator->cur_field)) { if (err) *err = 1; return NULL; } if (iterator->stat_buf) free(iterator->stat_buf); iterator->stat_buf = get_field_str(iterator->cur_field, err); return iterator->stat...
false
false
false
false
false
0
load_from_cache_file (GnomeBG *bg, const char *filename, gint num_monitor, gint best_width, gint best_height) { GdkPixbuf *pixbuf = NULL; gchar *cache_filename; cache_filename = get_wallpaper_cache_filename (filename, num_monitor, bg->placement, best_width, be...
false
false
false
false
false
0
image_new_readfile(const gchar* filename) { GdkPixbuf *pixbuf = NULL; gpaint_image *image = NULL; pixbuf = gdk_pixbuf_new_from_file(filename,0); if (pixbuf) { image = g_new(gpaint_image, 1); image->pixbuf = gdk_pixbuf_new_from_file(filename,0); } return image; }
false
false
false
false
false
0
test_parser_1_unsolicited (void) { FsoFrameworkParser* parser = NULL; FsoGsmStateBasedAtParser* _tmp0_ = NULL; gchar** _tmp1_ = NULL; gchar* _tmp2_ = NULL; gchar** _tmp3_ = NULL; #line 79 "/tmp/buildd/fso-gsmd-0.12.0/tests/testatparser.vala" _tmp0_ = fso_gsm_state_based_at_parser_new (); #line 79 "/tmp/buildd/fso...
false
false
false
false
false
0
amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev) { if (adev->pp_enabled) /* TODO */ return; if (adev->pm.dpm_enabled) { mutex_lock(&adev->pm.mutex); if (power_supply_is_system_supplied() > 0) adev->pm.dpm.ac_power = true; else adev->pm.dpm.ac_power = false; if (adev->pm.funcs->enable_bapm) ...
false
false
false
false
false
0
intel_iommu_add_device(struct device *dev) { struct intel_iommu *iommu; struct iommu_group *group; u8 bus, devfn; iommu = device_to_iommu(dev, &bus, &devfn); if (!iommu) return -ENODEV; iommu_device_link(iommu->iommu_dev, dev); group = iommu_group_get_for_dev(dev); if (IS_ERR(group)) return PTR_ERR(grou...
false
false
false
false
false
0
test_boxed_free (TestBoxed *boxed) { if (G_LIKELY (boxed)) { g_slice_free (TestBoxed, boxed); } }
false
false
false
false
false
0
cqueue_xattr_pre_gdi(lList *this_list, lList **answer_list) { bool ret = true; dstring cqueue_name = DSTRING_INIT; dstring host_domain = DSTRING_INIT; DENTER(CQUEUE_LAYER, "cqueue_xattr_pre_gdi"); if (this_list != NULL) { lListElem *cqueue = NULL; for_each(cqueue, this_list) { ...
false
false
true
false
true
1
cit_restart_stream(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; switch (sd->model) { case CIT_MODEL0: case CIT_MODEL1: cit_write_reg(gspca_dev, 0x0001, 0x0114); /* Fall through */ case CIT_MODEL2: case CIT_MODEL4: cit_write_reg(gspca_dev, 0x00c0, 0x010c); /* Go! */ usb_clear_ha...
false
false
false
false
false
0
static_cluster_end (const char *element, gamgi_gml *gml) { gamgi_cluster *cluster; int fileline; cluster = GAMGI_CAST_CLUSTER gml->ml.parent->data; if (cluster->type == GAMGI_CHEM_POLYTOPE) { /****************************************** * used only in error messages: file line * * indicates where current elem...
false
false
false
false
false
0
AddSizes(const PkgIterator &Pkg, bool const Inverse) { StateCache &P = PkgState[Pkg->ID]; if (Pkg->VersionList == 0) return; if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure && P.Keep() == true) return; // Compute the size data if (P.NewInstall() == true) { ...
false
false
false
false
false
0
csnset_get_csnset_node_from_csn(const CSNSet *csnset, const CSN *csn) { const CSNSet *f= NULL; const CSNSet *n= csnset; while(n!=NULL) { if(csn_compare(&n->csn, csn)==0) { f= n; n= NULL; } else { n= n->next; } } return f; }
false
false
false
false
false
0
s_doAboutDlg(XAP_Frame* pFrame, XAP_Dialog_Id id) { if (pFrame) { pFrame->raise(); } XAP_App * pApp = XAP_App::getApp(); UT_return_val_if_fail (pApp, false); XAP_DialogFactory * pDialogFactory = static_cast<XAP_DialogFactory *>(pApp->getDialogFactory()); XAP_Dialog_About * pDialog = static_cast<XAP_Dialog...
false
false
false
false
false
0
item_value(const ITEM * item) { T((T_CALLED("item_value(%p)"), item)); returnBool((Normalize_Item(item)->value) ? TRUE : FALSE); }
false
false
false
false
false
0
subunit() { nstring_list filename; bool batch = false; const char *outfile = 0; arglex(); while (arglex_token != arglex_token_eoln) { switch (arglex_token) { default: bad_argument(subunit_usage); // NOTREACHED case arglex_token_batch: if (batch) duplicate_option(subunit_usa...
false
false
false
false
false
0
brasero_image_format_get_default_path (BraseroImageFormat format, const gchar *name) { const gchar *suffixes [] = {".iso", ".toc", ".cue", ".toc", NULL }; const gchar *suffix = NULL; gchar *path; gint i = 0; if (format & BRASERO_IMAGE_FORMAT_BIN) suffix = suffixes [0];...
false
false
false
false
true
1
GMT_pow_array (double min, double max, double delta, GMT_LONG x_or_y, double **array) { double *val = NULL, v0, v1; GMT_LONG i, n; if (delta <= 0.0) return (0); if (frame_info.axis[x_or_y].type != 2) return (GMT_linear_array (min, max, delta, 0.0, array)); if (x_or_y == 0) { /* x-axis */ GMT_x_forward (min, &...
false
false
false
false
false
0
AddError( const string& filename, const string& element_name, const Message* descriptor, ErrorLocation location, const string& message) { if (owner_->error_collector_ == NULL) return; int line, column; owner_->source_locations_.Find(descriptor, location, &line, &column); owner_->error_colle...
false
false
false
false
false
0
glusterd_pending_node_get_rpc (glusterd_pending_node_t *pending_node) { struct rpc_clnt *rpc = NULL; glusterd_brickinfo_t *brickinfo = NULL; nodesrv_t *shd = NULL; glusterd_volinfo_t *volinfo = NULL; nodesrv_t *nfs = NULL; ...
false
false
false
false
false
0
set_pkeys(struct hfi1_devdata *dd, u8 port, u16 *pkeys) { struct hfi1_pportdata *ppd; int i; int changed = 0; int update_includes_mgmt_partition = 0; /* * IB port one/two always maps to context zero/one, * always a kernel context, no locking needed * If we get here with ppd setup, no need to check * that ...
false
false
false
false
false
0
handle_no_limit_stack_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED, bool *no_add_attrs) { tree decl = *node; if (TREE_CODE (decl) != FUNCTION_DECL) { error ("%J'%E' attribute applies only to functions", decl, name); *no_add_attrs = true; ...
false
false
false
false
false
0
parse_header (gchar *buf, gint *prx_idx, gint *ptx_idx, gint *brx_idx, gint *btx_idx) { gchar *p; gint i; *prx_idx = *ptx_idx = -1; *brx_idx = *btx_idx = -1; p = strtok (buf, "| \t\n"); p = strtok (NULL, "| \t\n"); /* skip the first one */ for (i = 0; p; i++, p = strtok (NULL, "| \t\n")) { if (!st...
false
false
false
false
false
0
ProcessArgs(int argc, const char *argv[]) { int i = 0; const char *video = "NORMAL"; extern int ConfigExecProg(const char *,char *const args[]); if (argc > 0 && argv[0][0] != '-') { video = argv[0]; i++; } ConsoleInit(video); while (i < argc) { const char *arg; if (argv[i][0] != '-...
false
false
false
false
false
0