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
tsi721_request_msix(struct rio_mport *mport) { struct tsi721_device *priv = mport->priv; int err = 0; err = request_irq(priv->msix[TSI721_VECT_IDB].vector, tsi721_sr2pc_ch_msix, 0, priv->msix[TSI721_VECT_IDB].irq_name, (void *)mport); if (err) goto out; err = request_irq(priv->msix[TSI721_VECT_PWRX].vect...
false
false
false
false
false
0
brcmf_commonring_write_available(struct brcmf_commonring *commonring) { u16 available; bool retry = true; again: if (commonring->r_ptr <= commonring->w_ptr) available = commonring->depth - commonring->w_ptr + commonring->r_ptr; else available = commonring->r_ptr - commonring->w_ptr; if (available > 1)...
false
false
false
false
false
0
fetch_done(isc_task_t *task, isc_event_t *event) { dns_fetchevent_t *devent = (dns_fetchevent_t *)event; dns_nta_t *nta = devent->ev_arg; isc_result_t eresult = devent->result; dns_ntatable_t *ntatable = nta->ntatable; dns_view_t *view = ntatable->view; isc_stdtime_t now; UNUSED(task); if (dns_rdataset_isasso...
false
false
false
false
false
0
gdip_get_metafile_from (void *pointer, GpMetafile **metafile, ImageSource source) { BOOL adjust_emf_headers = FALSE; GpStatus status = OutOfMemory; GpMetafile *mf = gdip_metafile_create (); if (!mf) goto error; /* decode metafile header */ status = gdip_get_metafileheader_from (pointer, &mf->metafile_header, s...
false
false
false
false
false
0
md_disks_req(void) { int i; if (!(md_ctrl_data.md_ctrl.ldrv.disks = xmalloc(sizeof (struct mdu_disk_info_s) * md_ctrl_data.md_ctrl.ldrv.nr_disks))) return; for (i = 0; i < md_ctrl_data.md_ctrl.ldrv.nr_disks; i++) { md_ctrl_data.md_ctrl.ldrv.disks[i].number = i; if (md_cmd (md_ctrl_data.fd...
false
false
false
false
false
0
__tty_buffer_request_room(struct tty_port *port, size_t size, int flags) { struct tty_bufhead *buf = &port->buf; struct tty_buffer *b, *n; int left, change; b = buf->tail; if (b->flags & TTYB_NORMAL) left = 2 * b->size - b->used; else left = b->size - b->used; change = (b->flags & TTYB_NORMAL) && ...
false
false
false
false
false
0
efx_mcdi_phy_get_module_info(struct efx_nic *efx, struct ethtool_modinfo *modinfo) { struct efx_mcdi_phy_data *phy_cfg = efx->phy_data; switch (phy_cfg->media) { case MC_CMD_MEDIA_SFP_PLUS: modinfo->type = ETH_MODULE_SFF_8079; modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN; return 0; default: return -E...
false
false
false
false
false
0
stun_debug_bytes (const void *data, size_t len) { size_t i; stun_debug ("0x"); for (i = 0; i < len; i++) stun_debug ("%02x", ((const unsigned char *)data)[i]); }
false
false
false
false
false
0
sound_print(snd_expr, n) LVAL snd_expr; long n; { LVAL result; xlsave1(result); result = xleval(snd_expr); if (vectorp(result)) { /* make sure all elements are of type a_sound */ long i = getsize(result); while (i > 0) { i--; if (!exttypep(getelement(...
false
false
false
true
false
1
row_activated_cb(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data) { GtkTreeModel *model; GtkTreeIter iter; HybridBuddy *buddy; gint depth; model = gtk_tree_view_get_model(treeview); gtk_tree_model_get_iter(model, &iter, ...
false
false
false
false
false
0
egg_asn1x_get_bmpstring_as_utf8 (GNode *node) { gchar *string; gsize n_string; gchar *utf8; g_return_val_if_fail (node, NULL); string = (gchar*)egg_asn1x_get_string_as_raw (node, NULL, &n_string); if (!string) return NULL; utf8 = g_convert (string, n_string, "UTF-8", "UTF-16BE", NULL, NULL, NULL); g_free (...
false
false
false
false
false
0
db_log_cache_stats(void) { int i, depth, histogram[VC_CACHE_STATS_MAX + 1]; vc_entry *vc; for (i = 0; i < VC_CACHE_STATS_MAX + 1; i++) { histogram[i] = 0; } for (i = 0; i < vc_size; i++) { depth = 0; for (vc = vc_table[i]; vc; vc = vc->next) depth++; if (depth > VC_CACHE_STATS_MAX) d...
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)); IcdCodeSelector *_t = static_cast<IcdCodeSelector *>(_o); switch (_id) { case 0: _t->entered((*reinterpret_cast< const QVariant(...
false
false
false
false
false
0
ParseInvertFlagValue( istream &infile, char linetext[256], char **cpp, int *invertFlag) { char data[256]; if (!this->ParseStringValue(infile, linetext, cpp, data)) { return 0; } if (strcmp(data, "False") == 0) { *invertFlag = 0; } else if (strcmp(data, "True") == 0) { *invertF...
false
false
false
false
false
0
connmark_tg_parse(struct xt_option_call *cb) { struct xt_connmark_tginfo1 *info = cb->data; xtables_option_parse(cb); switch (cb->entry->id) { case O_SET_XMARK: info->mode = XT_CONNMARK_SET; info->ctmark = cb->val.mark; info->ctmask = cb->val.mask; break; case O_SET_MARK: info->mode = XT_CONNMARK_SE...
false
false
false
false
false
0
ethi_dispose (GObject *object) { ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (object); ethi_drop_table_header (ethi); scroll_off (ethi); if (ethi->resize_cursor) { g_object_unref (ethi->resize_cursor); ethi->resize_cursor = NULL; } if (ethi->dnd_code) { g_free (ethi->dnd_code); ethi->dnd_code = NULL;...
false
false
false
false
false
0
velocity_mii_read(struct mac_regs *regs, u8 index, u16 * data) { u16 ww; /* * Disable MIICR_MAUTO, so that mii addr can be set normally */ safe_disable_mii_autopoll(regs); writeb(index, &regs->MIIADR); BYTE_REG_BITS_ON(MIICR_RCMD, &regs->MIICR); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { if (!(readb(...
false
false
false
false
false
0
eialpha(real_t x, int n, real_t alpha[]) { int k; real_t a,b,c; c=1.0/x; a=exp(-x); b=alpha[0]=a*c; for (k=1; k<=n; k++) alpha[k]=b=(a+k*b)*c; }
false
false
false
false
false
0
check_name(const char *name) { static const char *const allowed = "_.,-[]"; while ('\0' != *name) { if (!fc_isalnum(*name) && NULL == strchr(allowed, *name)) { return FALSE; } name++; } return TRUE; }
false
false
false
false
false
0
Set( const char *pszPath, const char *pszValue ) { CPLString osPath = pszPath; int iDot; iDot = osPath.find_first_of('.'); /* -------------------------------------------------------------------- */ /* We have an intermediate node, find or create it and */ /* recurse. ...
false
false
false
false
false
0
GOTemplateCache_WriteDataToCache(WorldSession *session) { if (!session->objmgr.GetGOTemplateCount()) return; const char* fn = "./cache/GOTemplates.cache"; std::fstream fh; fh.open(fn, std::ios_base::out | std::ios_base::binary); if(!fh) { logerror("GOTemplateCache: Could not wri...
false
false
false
false
false
0
getChar() { int c; DO_GET_CHAR return c; }
false
false
false
false
false
0
args(int argc, char **argv) { int i; if (Fl::args(argc,argv,i) < argc) Fl::error(helpmsg); }
false
false
false
false
false
0
fm_bookmarks_finalize(GObject *object) { FmBookmarks *self; g_return_if_fail(object != NULL); g_return_if_fail(FM_IS_BOOKMARKS(object)); self = FM_BOOKMARKS(object); if(idle_handler) { g_source_remove(idle_handler); idle_handler = 0; } g_list_foreach(self->items, (GFu...
false
false
false
false
false
0
cl_process_keep(Topform c) { Stats.kept++; if (!c->normal_vars) renumber_variables(c, MAX_VARS); if (c->id == 0) assign_clause_id(c); // unit conflict or input: already has ID mark_parents_as_used(c); mark_maximal_literals(c->literals); mark_selected_literals(c->literals, stringparm1(Opt->literal_s...
false
false
false
false
false
0
resolve(ITF *itf,uint32_t ip,ENTRY **entry,int want_vc) { *entry = lookup_ip(itf,ip); if ((!*entry || (*entry)->state != as_valid) && !itf->arp_srv) return -1; /* bad luck - no ARP server when we need one */ if (*entry) { if (want_vc) (*entry)->flags &= ~ATF_NOVC; switch ((*entry)->state) { case as_...
false
false
false
false
false
0
png_get_PLTE(png_const_structrp png_ptr, png_inforp info_ptr, png_colorp *palette, int *num_palette) { png_debug1(1, "in %s retrieval function", "PLTE"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE) && palette != NULL) { *palette = info_ptr->palette; *num...
false
false
false
false
false
0
unsafe_request_wait(struct inode *inode) { struct ceph_inode_info *ci = ceph_inode(inode); struct ceph_mds_request *req1 = NULL, *req2 = NULL; int ret, err = 0; spin_lock(&ci->i_unsafe_lock); if (S_ISDIR(inode->i_mode) && !list_empty(&ci->i_unsafe_dirops)) { req1 = list_last_entry(&ci->i_unsafe_dirops, str...
false
false
false
false
false
0
mnt_get_username(const uid_t uid) { struct passwd pwd; struct passwd *res; #ifdef _SC_GETPW_R_SIZE_MAX size_t sz = sysconf(_SC_GETPW_R_SIZE_MAX); #else size_t sz = 0; #endif char *buf, *username = NULL; if (sz <= 0) sz = 16384; /* Should be more than enough */ buf = malloc(sz); if (!buf) ret...
false
false
false
false
false
0
_cogl_matrix_transform_points_f3 (const CoglMatrix *matrix, size_t stride_in, const void *points_in, size_t stride_out, void *points_out, int n_points...
false
false
false
false
false
0
parse_contact_class(param_hooks_t* _h, param_t* _p) { if (!_p->name.s) { LM_ERR("empty value\n"); return; } switch(_p->name.s[0]) { case 'q': case 'Q': if (_p->name.len == 1) { _p->type = P_Q; _h->contact.q = _p; } break; case 'e': case 'E': if ((_p->name.len == 7) && (!strncasecmp(_p...
false
false
false
false
false
0
visitEnter( const KBookmarkGroup &grp ) { // kDebug() << "visitEnter(" << grp.text() << ")"; m_out << "#FOLDER" << endl; m_out << "\tNAME="<< grp.fullText() << endl; m_out << endl; }
false
false
false
false
false
0
xfs_compat_flock64_copyin( xfs_flock64_t *bf, compat_xfs_flock64_t __user *arg32) { if (get_user(bf->l_type, &arg32->l_type) || get_user(bf->l_whence, &arg32->l_whence) || get_user(bf->l_start, &arg32->l_start) || get_user(bf->l_len, &arg32->l_len) || get_user(bf->l_sysid, &arg32->l_sysid) || ...
false
false
false
false
false
0
ptr_torealptr(const struct ptr_infos *infos, int64_t ptr, uint32_t read_size) { struct ptr_info *info; int32_t ptrid = ptr >> 32; uint32_t ptroff = (uint32_t)ptr; TRACE_PTR(ptr, read_size); if (UNLIKELY(!ptrid)) { (void)bcfail("nullptr", ptrid, 0, __FILE__, ...
false
false
false
false
false
0
World_getTilev( World *w, const vec2i *loc ) { if( w && loc->x < wmap_width && loc->y < wmap_height ) return &w->tiles[loc->y*wmap_width + loc->x]; return NULL; }
false
false
false
false
false
0
wtable_get(struct wtable *t, const char *key) { void *value; struct wentry *entry; /* Do an exact lookup first. */ value = hash_get(t->finals, key); if (value) return value; /* Then see if we can find it in the wcache */ if (cache_get(t->wcache, key, &value)) return value; /* And then walk the wildcards ...
false
false
false
false
false
0
gribapiDecode(unsigned char *gribbuffer, int gribsize, double *data, int gridsize, int unreduced, int *nmiss, int *zip, double missval, int vlistID, int varID) { int status = 0; #if defined (HAVE_LIBGRIB_API) long lpar; long editionNumber, numberOfPoints; size_t datasize, dummy, recsize; grib_handle *gh...
false
false
false
false
false
0
resize(unsigned newsize) { if (size_ == newsize) return; unsigned cnt = (size_ + BITS_PER_WORD - 1) / BITS_PER_WORD; if (newsize > BITS_PER_WORD) { unsigned newcnt = (newsize + BITS_PER_WORD - 1) / BITS_PER_WORD; if (newcnt == cnt) { // If the word count doesn't change, then the...
false
false
false
false
false
0
qlcnic_sriov_cleanup(struct qlcnic_adapter *adapter) { if (!test_bit(__QLCNIC_SRIOV_ENABLE, &adapter->state)) return; qlcnic_sriov_free_vlans(adapter); if (qlcnic_sriov_pf_check(adapter)) qlcnic_sriov_pf_cleanup(adapter); if (qlcnic_sriov_vf_check(adapter)) qlcnic_sriov_vf_cleanup(adapter); }
false
false
false
false
false
0
is_valid_to_disp() { //--- check if the nations are still there -----// if( nation_array.is_deleted(from_nation_recno) ) return 0; if( nation_array.is_deleted(to_nation_recno) ) return 0; //--------------------------------------// Nation* toNation = nation_array[to_nation_recno]; Nation* fromNation = na...
false
false
false
false
false
0
text_flush (Driver *drvthis) { PrivateData *p = drvthis->private_data; char out[LCD_MAX_WIDTH]; int i; memset(out, '-', p->width); out[p->width] = '\0'; printf("+%s+\n", out); for (i = 0; i < p->height; i++) { memcpy(out, p->framebuf + (i * p->width), p->width); out[p->width] = '\0'; printf("|%s|\n", out...
false
false
false
false
false
0
db_search(VALUE vself, VALUE vcond){ VALUE vdb, vres, tres, tcond; ESTDBMGR *db; ESTRES *ores; ESTCOND *cond; CBMAP *hints; int *res, rnum; vdb = rb_iv_get(vself, VNDATA); Data_Get_Struct(vdb, ESTDBMGR, db); if(!db->db) rb_raise(rb_eArgError, "invalid argument"); if(rb_obj_is_instance_of(vcond, cls_...
false
false
false
false
false
0
is_simple_subquery(Query *subquery) { /* * Let's just make sure it's a valid subselect ... */ if (!IsA(subquery, Query) || subquery->commandType != CMD_SELECT || subquery->utilityStmt != NULL || subquery->intoClause != NULL) elog(ERROR, "subquery is bogus"); /* * Can't currently pull up a query with s...
false
false
false
false
false
0
game_hint_timeout_cb (Game* self) { gboolean result = FALSE; guint _tmp0_ = 0U; guint _tmp3_ = 0U; Tile* _tmp4_ = NULL; Tile* _tmp6_ = NULL; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = self->hint_blink_counter; if (_tmp0_ == ((guint) 0)) { guint _tmp1_ = 0U; _tmp1_ = self->priv->hint_timout; if (...
false
false
false
false
false
0
GetList(int regionId, vtkIdList **which) { int i; struct _cellList *list = &this->CellList; vtkIdList *cellIds = NULL; if (which && (list->nRegions == this->NumberOfRegions)) { cellIds = which[regionId]; } else if (which) { for (i=0; i< list->nRegions; i++) { if (list->regionI...
false
false
false
false
false
0
updateWithLyXErr() { appendLyXErrMessage(toqstr(lyxerr_stream_.str())); lyxerr_stream_.str(""); }
false
false
false
false
false
0
menf21bmc_wdt_exit_prod_mode(struct i2c_client *client) { int val, ret; val = i2c_smbus_read_byte_data(client, BMC_CMD_WDT_PROD_STAT); if (val < 0) return val; /* * Production mode should be not active after delivery of the Board. * To be sure we check it, inform the user and exit the mode * if active. ...
false
false
false
false
false
0
lbs_ps_confirm_sleep(struct lbs_private *priv) { unsigned long flags =0; int allowed = 1; lbs_deb_enter(LBS_DEB_HOST); spin_lock_irqsave(&priv->driver_lock, flags); if (priv->dnld_sent) { allowed = 0; lbs_deb_host("dnld_sent was set\n"); } /* In-progress command? */ if (priv->cur_cmd) { allowed = 0; ...
false
false
false
false
false
0
init_copy_prop (void) { basic_block bb; n_copy_of = num_ssa_names; copy_of = XCNEWVEC (prop_value_t, n_copy_of); FOR_EACH_BB (bb) { gimple_stmt_iterator si; int depth = bb_loop_depth (bb); for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si)) { gimple stmt = gsi_stmt (si); ...
false
false
false
false
false
0
insert_string_link_codepoints (GucharmapCharmap *charmap, GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *str) { const gchar *p1, *p2; p1 = str; for (;;) { p2 = find_codepoint (p1); if (p2 != NULL)...
false
false
false
false
false
0
format_advance_queue (source_t *source, client_t *client) { refbuf_t *refbuf = client->refbuf; if (refbuf == NULL) return -1; if (refbuf->next == NULL && client->pos == refbuf->len) return -1; /* move to the next buffer if we have finished with the current one */ if (refbuf->next ...
false
false
false
false
false
0
Cddb_Set_Apply_Button_Sensitivity (void) { gboolean cddbsettoallfields, cddbsettotitle, cddbsettoartist, cddbsettoalbum, cddbsettoyear, cddbsettotrack, cddbsettotracktotal, cddbsettogenre, cddbsettofilename; // Tag fields cddbsettoallfields = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Cdd...
false
false
false
false
false
0
_process(LodConfig& lodConfig, LodCollapseCost* cost, LodData* data, LodInputProvider* input, LodOutputProvider* output, LodCollapser* collapser) { input->i...
false
false
false
false
false
0
ss_ilg(saidx_t n) { #if SS_BLOCKSIZE == 0 # if defined(BUILD_DIVSUFSORT64) return (n >> 32) ? ((n >> 48) ? ((n >> 56) ? 56 + lg_table[(n >> 56) & 0xff] : 48 + lg_table[(n >> 48) & 0xff]) : ((n >> 40) ? 40 + lg_table[(n >> 40) & 0xff] : ...
false
false
false
false
false
0
gx_concrete_space_DeviceN(const gs_color_space * pcs, const gs_imager_state * pis) { bool is_lab = false; #ifdef DEBUG /* * Verify that the color space and imager state info match. */ if (pcs->id != pis->color_component_map.cspace_id) dmprintf(pis->memory, "gx_con...
false
false
false
false
false
0
show_modified(struct oneway_unpack_data *cbdata, struct cache_entry *old, struct cache_entry *new, int report_missing, int cached, int match_missing) { unsigned int mode, oldmode; const unsigned char *sha1; struct rev_info *revs = cbdata->revs; if (get_stat_data(new, &sha1, &mode, cached, match_mis...
false
false
false
false
false
0
qrt_compressed(struct bgtask *unused_h, void *unused_u, bgstatus_t status, void *arg) { struct qrt_update *qup = arg; struct routing_patch *rp; int msgcount; (void) unused_h; (void) unused_u; g_assert(qup->magic == QRT_UPDATE_MAGIC); qup->compress = NULL; qup->ready = TRUE; if G_UNLIKELY(status == BGS_KILL...
false
false
false
false
false
0
dbuf_malloc_error(dbuf *dyn) { dbufbuf *p; dyn->length = 0; dyn->offset = 0; while ((p = dyn->head) != NULL) { dyn->head = p->next; dbuf_free(p); } #ifdef DBUF_TAIL dyn->tail = dyn->head; #endif return -1; }
false
false
false
false
false
0
gcr_mock_prompter_start (void) { GError *error = NULL; g_assert (running == NULL); running = g_new0 (ThreadData, 1); running->mutex = g_new0 (GMutex, 1); g_mutex_init (running->mutex); running->start_cond = g_new0 (GCond, 1); g_cond_init (running->start_cond); g_queue_init (&running->responses); g_mutex_lock...
false
false
false
false
false
0
find (const char *label) const { return find (wxString (label, wxConvUTF8)); }
false
false
false
false
false
0
Sort(size_t tableLimit) { // recusively sort NodeMap::iterator iter; for (iter = m_map.begin() ; iter != m_map.end() ; ++iter) { iter->second.Sort(tableLimit); } // sort TargetPhraseCollection in this node if (m_targetPhraseCollection != NULL) m_targetPhraseCollection->NthElement(tableLimit); }
false
false
false
false
false
0
cleanUpObjects() { for (vector<TeXObject*>::size_type i = 0; i < m_TeXObjects.size(); i++) { delete m_TeXObjects[i]; } m_TeXObjects.clear(); }
false
false
false
false
false
0
Collide(const AABBQuantizedNoLeafTree* tree0, const AABBQuantizedNoLeafTree* tree1, const Matrix4x4* world0, const Matrix4x4* world1, Pair* cache) { // Init collision query InitQuery(world0, world1); // Check previous state if(CheckTemporalCoherence(cache)) return true; // Setup dequantization coeffs mCenterCo...
false
false
false
false
false
0
OnRazorStatsCheck( wxCommandEvent& WXUNUSED(event) ) { int item = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); if (item == -1) { return; } // ADUNANZA BEGIN // Back #if 0 CSearchFile* file = (CSearchFile*)GetItemData( item ); #else CSearchFile* file = reinterpret_cast<CSearchFile*>(GetItemData(ite...
false
false
false
false
false
0
redraw(void) { int i; char command[128]; R_close_driver(); sprintf(command, "d.erase"); system(command); if (cmd) { system(cmd); } else { /* Redraw raster map */ if (rast) { for (i = 0; i < nrasts; i++) { sprintf(command, "d.rast -o map=%s", rast[i]); system(command); ...
false
false
false
false
false
0
fqGetInt64( FQATOM * pValue) { if (pValue->eType == FLM_INT32_VAL) { return( (FLMINT64)pValue->val.i32Val); } else if( pValue->eType == FLM_INT64_VAL) { return( pValue->val.i64Val); } else if( pValue->eType == FLM_UINT32_VAL) { return( (FLMINT64)pValue->val.ui32Val); } else if( pValue->eType == FLM_UI...
false
false
false
false
false
0
ltc2945_show_bool(struct device *dev, struct device_attribute *da, char *buf) { struct sensor_device_attribute *attr = to_sensor_dev_attr(da); struct regmap *regmap = dev_get_drvdata(dev); unsigned int fault; int ret; ret = regmap_read(regmap, LTC2945_FAULT, &fault); if (ret < 0) return ret; fault &= at...
false
false
false
false
false
0
renameSelectedPlayer() { const QModelIndexList& selection = ui->tagList->selectionModel()->selectedIndexes(); if(selection.count()) { QString ts = selection[0].data().toString(); emit renameRequest(ts); } }
false
false
false
false
false
0
srp_queue_remove_work(struct srp_target_port *target) { bool changed = false; spin_lock_irq(&target->lock); if (target->state != SRP_TARGET_REMOVED) { target->state = SRP_TARGET_REMOVED; changed = true; } spin_unlock_irq(&target->lock); if (changed) queue_work(srp_remove_wq, &target->remove_work); retur...
false
false
false
false
false
0
nm_ip4_config_add_nis_server (NMIP4Config *config, guint32 nis) { NMIP4ConfigPrivate *priv; int i; g_return_if_fail (NM_IS_IP4_CONFIG (config)); g_return_if_fail (nis > 0); priv = NM_IP4_CONFIG_GET_PRIVATE (config); for (i = 0; i < priv->nis->len; i++) { guint32 s = g_array_index (priv->nis, guint32, i); /...
false
false
false
false
false
0
set_c_upper (const unsigned char * from, const unsigned char * to) { if (dos_chars) while (*from) c_upper[win_to_dos[*from++]] = win_to_dos[*to++] ; else while (*from) c_upper[*from++] = *to++ ; }
false
false
false
false
false
0
fs_rtp_sub_stream_has_stopped_enter (FsRtpSubStream *self) { g_static_rw_lock_reader_lock (&self->priv->stopped_lock); if (self->priv->stopped) { g_static_rw_lock_reader_unlock (&self->priv->stopped_lock); return TRUE; } return FALSE; }
false
false
false
false
false
0
qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn, enum protocol_type type, u32 *p_cid) { struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; u32 rel_cid; if (type >= MAX_CONN_TYPES || !p_mngr->acquired[type].cid_map) { DP_NOTICE(p_hwfn, "Invalid protocol type %d", type); return -EINVAL; } rel_cid = find_first...
false
false
false
false
false
0
prepare_shell_cmd(const char **argv) { int argc, nargc = 0; const char **nargv; for (argc = 0; argv[argc]; argc++) ; /* just counting */ /* +1 for NULL, +3 for "sh -c" plus extra $0 */ nargv = xmalloc(sizeof(*nargv) * (argc + 1 + 3)); if (argc < 1) die("BUG: shell command is empty"); if (strcspn(argv[0], ...
false
false
false
false
false
0
HealPlayer(Player* target) { if (!m_ai) return RETURN_NO_ACTION_ERROR; if (!m_bot) return RETURN_NO_ACTION_ERROR; if (!target) return RETURN_NO_ACTION_INVALIDTARGET; if (target->IsInDuel()) return RETURN_NO_ACTION_INVALIDTARGET; return RETURN_NO_ACTION_OK; }
false
false
false
false
false
0
capitalize (char *syllable) { char tmp = 0x00; int i = 0; if ( randint(2) == TRUE) { (void)memcpy((void *)&tmp, (void *)syllable, sizeof(tmp)); for(i=0; i < 26; i++) if ( let[i] == tmp ) if (is_restricted_symbol(clet[i]) != TRUE) (void)memcpy ((void *)syllable, (void *)&clet[i], 1); } ...
false
false
false
false
false
0
pref_end_external(){ const gchar *text; LOG(LOG_DEBUG, "IN : pref_end_external()"); text = gtk_entry_get_text(GTK_ENTRY(entry_mpeg)); if(mpeg_template) free(mpeg_template); mpeg_template = strdup(text); text = gtk_entry_get_text(GTK_ENTRY(entry_wave)); if(wave_template) free(wave_template); wave_templat...
false
false
false
false
false
0
ClassAbstractPCommand( void *theEnv) { DATA_OBJECT tmp; DEFCLASS *cls; if (EnvArgTypeCheck(theEnv,"class-abstractp",1,SYMBOL,&tmp) == FALSE) return(FALSE); cls = LookupDefclassByMdlOrScope(theEnv,DOToString(tmp)); if (cls == NULL) { ClassExistError(theEnv,"class-abstractp",ValueTo...
false
false
false
false
false
0
indentationString(int startColumn, int targetColumn) { targetColumn = qMax(startColumn, targetColumn); QString s; int alignedStart = startColumn - (startColumn % 30) + 30; if(alignedStart > startColumn && alignedStart <= targetColumn) { s += QLatin1Char('\t'); startColumn = alignedStart; } if(int...
false
false
false
false
false
0
can_fill_info(struct sk_buff *skb, const struct net_device *dev) { struct can_priv *priv = netdev_priv(dev); struct can_ctrlmode cm = {.flags = priv->ctrlmode}; struct can_berr_counter bec; enum can_state state = priv->state; if (priv->do_get_state) priv->do_get_state(dev, &state); if ((priv->bittiming.bitrat...
false
false
false
false
false
0
mei_hbm_pg_enter_res(struct mei_device *dev) { if (mei_pg_state(dev) != MEI_PG_OFF || dev->pg_event != MEI_PG_EVENT_WAIT) { dev_err(dev->dev, "hbm: pg entry response: state mismatch [%s, %d]\n", mei_pg_state_str(mei_pg_state(dev)), dev->pg_event); return -EPROTO; } dev->pg_event = MEI_PG_EVENT_RECEIVED;...
false
false
false
false
false
0
lookup_map(size_t nmatch, regmatch_t pmatch[], char *src, u_short port) { struct map *res = NULL, *map = maps; char *host; char host_buf[MAXHOSTNAMELEN], *o; strncpy(host_buf, src, sizeof(host_buf) - 1); host_buf[sizeof(host_buf) - 1] = 0; /* now host_buf contain host p...
false
false
false
false
false
0
ms_presenter_8k_quirk(struct hid_input *hi, struct hid_usage *usage, unsigned long **bit, int *max) { if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) return 0; set_bit(EV_REP, hi->input->evbit); switch (usage->hid & HID_USAGE) { case 0xfd08: ms_map_key_clear(KEY_FORWARD); break; case 0xfd09: ms_map_key_...
false
false
false
false
false
0
glGenTexturesEXT(GLsizei n, GLuint * textures) { struct glx_context * const gc = __glXGetCurrentContext(); #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH(); PFNGLGENTEXTURESEXTPROC p = ...
false
true
false
false
false
1
dlmfs_file_open(struct inode *inode, struct file *file) { int status, level, flags; struct dlmfs_filp_private *fp = NULL; struct dlmfs_inode_private *ip; if (S_ISDIR(inode->i_mode)) BUG(); mlog(0, "open called on inode %lu, flags 0x%x\n", inode->i_ino, file->f_flags); status = dlmfs_decode_open_flags...
false
false
false
false
false
0
fio_rewind(struct expr_t *fdxp) { int32 fd; /* fd is OS file number with high bit anded off - on error OS err num set */ if ((fd = chk_get_ver_fd(fdxp)) == -1) return(-1); fseek(__fio_fdtab[fd]->fd_s, 0L, SEEK_SET); /* returns 0 on success */ return(0); }
false
false
false
false
false
0
WriteIndexData(void) { // skip if no index file available if ( !IsIndexOpen ) return false; // iterate over index entries bool success = true; stringstream indexBuffer; vector<FastaIndexData>::const_iterator indexIter = Index.begin(); vector<FastaIndexData>::const_iterator indexEnd = ...
false
false
false
false
false
0
loadData(UResourceBundle* rb, const char* key, UBool& shortCommonlyUsed) { if (rb == NULL || key == NULL || *key == 0) { return NULL; } UErrorCode status = U_ZERO_ERROR; const UChar **names = NULL; UResourceBundle* rbTable = NULL; rbTable = ures_getByKeyWithFallback(rb, key, rbTable, &...
false
false
false
false
false
0
RestoreLibraryState(char *start_address) { while (*start_address != '\0') { internal_load_library(start_address); start_address += strlen(start_address) + 1; } }
false
false
false
false
false
0
joe_wcwidth(int wide, unsigned int ucs) { /* If terminal is not UTF-8 or file is not UTF-8: width is 1 */ /* FIXME */ if (!locale_map->type || !wide) return (1); if ((wide = unictrl(ucs))) return (wide); /* combining characters use 0 screen columns */ if (mb_ucsbsearch(mb_ucs_combining, NELEM(mb_ucs_combini...
false
false
false
false
false
0
do_free_exception (tree ptr) { tree fn; fn = get_identifier ("__cxa_free_exception"); if (!get_global_value_if_present (fn, &fn)) { /* Declare void __cxa_free_exception (void *). */ fn = push_void_library_fn (fn, tree_cons (NULL_TREE, ptr_type_node, void_list_node)); } return build_...
false
false
false
false
false
0
PushComment( const char* comment ) { if ( _elementJustOpened ) { SealElement(); } if ( _textDepth < 0 && !_firstElement && !_compactMode) { Print( "\n" ); PrintSpace( _depth ); } _firstElement = false; Print( "<!--%s-->", comment ); }
false
false
false
false
false
0
zc_crk_ptext_attack(struct zc_crk_ptext *ptext, struct zc_key *out_key) { struct key_table *table[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; if (ptext_final_init(table)) return -ENOMEM; generate_key0lsb(ptext); ptext->key_found = false; for (uint32_t i = 0; i < ptext->key2->size; ++i) { ...
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)); OptionsTabShortcuts *_t = static_cast<OptionsTabShortcuts *>(_o); switch (_id) { case 0: _t->onAdd(); break; case 1: _t-...
false
false
false
false
false
0
is_sets(RegExpNode *p) { Buffer buf; int c=curchar(); int call_parsechar=1; if (c == ':') { do { buf += c; nextchar(); } while ( (c=curchar()) >= 0 && isalpha(c)); if (c == ':') { buf += c; nextchar(); c=curchar(); if (c == ']') { buf += '\0'; const char *q=(const char *)buf; ...
false
false
false
false
false
0
cpa_cmd_contains_path(const char *prefix, int prefix_len) { int i; /* * If the filename starts with a ~, then this implies a ~username * expression, which constitutes a pathname. */ if(*prefix == '~') return 1; /* * If the filename starts with the root directory, then it obviously * starts with a pathname....
false
false
false
false
false
0
iFileGetc (void) { int c; readnext: c = readNextChar (); /* If previous character was a newline, then we're starting a line. */ if (File.newLine && c != EOF) { fileNewline (); if (c == '#' && Option.lineDirectives) { if (parseLineDirective ()) goto readnext; else { mi...
false
false
false
false
false
0
actspk(verb) int verb; { char i; if (verb<1 || verb>31) bug(39); i = actmsg[verb]; if (i) rspeak(i); }
false
false
false
false
false
0
DoSetAttribute( const wxString& name, wxVariant& value ) { // Return false on some occasions to make sure those attribs will get // stored in m_attributes. if ( name == wxPG_FILE_SHOW_FULL_PATH ) { if ( wxPGVariantToInt(value) ) m_flags |= wxPG_PROP_SHOW_FULL_FILENAME; else ...
false
false
false
false
false
0
mdhd_Size(GF_Box *s) { GF_Err e; GF_MediaHeaderBox *ptr = (GF_MediaHeaderBox *)s; ptr->version = (ptr->duration>0xFFFFFFFF) ? 1 : 0; e = gf_isom_full_box_get_size(s); if (e) return e; ptr->size += 4; ptr->size += (ptr->version == 1) ? 28 : 16; return GF_OK; }
false
false
false
false
false
0