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
e1000e_get_variants_82571(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; static int global_quad_port_a; /* global port a indication */ struct pci_device *pdev = adapter->pdev; u16 eeprom_data = 0; int is_port_b = er32(STATUS) & E1000_STATUS_FUNC_1; /* tag quad port adapters first, it's used...
false
false
false
false
false
0
panels_can_be_displayed() { if (tty_lines >= 7) { if (two_panel_mode) { if (tty_columns >= 6 * 2) return ON; } else if (tty_columns >= 6) return ON; } return OFF; }
false
false
false
false
false
0
min_expand (MatchState *ms, const char *s, const char *p, const char *ep) { for (;;) { const char *res = match(ms, s, ep+1); if (res != NULL) return res; else if (singlematch(ms, s, p, ep)) s++; /* try with one more repetition */ else return NULL; } }
false
false
false
false
false
0
valid_entry(Level *level) { gboolean result=FALSE; gchar *error; GtkWidget *dialog; g_assert(level->questions); g_assert(level->answers); if ( strlen(level->questions) == 0 ) { error = g_strdup (_("Questions cannot be empty.") ); goto error; } /* Now check all chars in questions are...
false
false
false
false
false
0
strcat_oids( char *buf, char *prefix, char **oids, int schema_ds4x_compat ) { char *p; int i; if ( NULL != oids && NULL != oids[0] ) { p = buf + strlen(buf); /* skip past existing content */ if ( NULL == oids[1] && !schema_ds4x_compat ) { sprintf( p, "%s %s ", prefix, oids[0] ); /* just one oid */ } els...
false
true
false
false
false
1
glade_clipboard_add (GladeClipboard *clipboard, GList *widgets) { GladeWidget *widget; GList *list; /* * Clear selection for the new widgets. */ glade_clipboard_selection_clear (clipboard); /* * Add the widgets to the list of children. */ for (list = widgets; list && list->data; list = list->next)...
false
false
false
false
false
0
FinePortamentoDown(MODCHANNEL *pChn, UINT param) //--------------------------------------------------------------- { if (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)) { if (param) pChn->nOldFinePortaUpDown = param; else param = pChn->nOldFinePortaUpDown; } if (m_dwSongFlags & SONG_FIRSTTICK) { if ((pChn->nPeriod) && (...
false
false
false
false
false
0
param_is_printable(int i)const { switch (MODEL_BUILT_IN_DIODE::param_count() - 1 - i) { case 0: return (false); case 1: return (true); case 2: return (true); case 3: return (true); case 4: return (true); case 5: return (true); case 6: return (true); case 7: return (true); case 8: return (tr...
false
false
false
false
false
0
__ecereRegisterModule_CallStackView(struct __ecereNameSpace__ecere__com__Instance * module) { struct __ecereNameSpace__ecere__com__Class * class; class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "CallStackView", "ecere::gui::Window", sizeof(struct CallStackView), 0, __ecereConstructor_CallStackView, __ec...
false
false
false
false
false
0
update_view_title(struct view *view) { char buf[SIZEOF_STR]; char state[SIZEOF_STR]; size_t bufpos = 0, statelen = 0; WINDOW *window = display[0] == view ? display_title[0] : display_title[1]; assert(view_is_displayed(view)); if (!view_has_flags(view, VIEW_CUSTOM_STATUS) && view->lines) { unsigned int view_li...
false
false
false
false
false
0
read_cis_cache(struct pcmcia_socket *s, int attr, u_int addr, size_t len, void *ptr) { struct cis_cache_entry *cis; int ret = 0; if (s->state & SOCKET_CARDBUS) return -EINVAL; mutex_lock(&s->ops_mutex); if (s->fake_cis) { if (s->fake_cis_len >= addr+len) memcpy(ptr, s->fake_cis+addr, len); else { ...
false
false
false
false
false
0
Init() { static ClassDocumentation<SMHiggsFermionsDecayer> documentation ("The SMHiggsFermionsDecayer class implements the decat of the Standard Model" " Higgs boson to the Standard Model fermions"); static ParVector<SMHiggsFermionsDecayer,double> interfaceMaxWeights ("MaxWeights", "Maximum weig...
false
false
false
false
false
0
cleanup(void) { outs(exit_attribute_mode); if (!outs(orig_colors)) outs(orig_pair); outs(clear_screen); outs(cursor_normal); printf("\n\n%ld total chars, rate %.2f/sec\n", total_chars, ((double) (total_chars) / (time((time_t *) 0) - started))); }
false
false
false
false
false
0
maximum_absolute_value() const { REPORT if (storage == 0) NullMatrixError(this); Real maxval = 0.0; int l = storage; Real* s = store; while (l--) { Real a = fabs(*s++); if (maxval < a) maxval = a; } ((GeneralMatrix&)*this).tDelete(); return maxval; }
false
false
false
false
false
0
x_server_finalize (GObject *object) { XServer *self; self = X_SERVER (object); g_free (self->priv->hostname); g_free (self->priv->address); if (self->priv->authority) g_object_unref (self->priv->authority); if (self->priv->connection) xcb_disconnect (self->priv->connection); ...
false
false
false
false
false
0
sort_and_combine_web_pairs (int for_move) { unsigned int i; struct web_pair **sorted; struct web_pair *p; if (!num_web_pairs) return; sorted = xmalloc (num_web_pairs * sizeof (sorted[0])); for (p = web_pair_list, i = 0; p; p = p->next_list) sorted[i++] = p; if (i != num_web_pairs) abort (); ...
false
false
false
false
false
0
ad_tree_set_security(AW_root *aw_root) { if (GLOBAL_gb_main) { GB_transaction dummy(GLOBAL_gb_main); char *treename = aw_root->awar(AWAR_TREE_NAME)->read_string(); GBDATA *ali_cont = GBT_get_tree(GLOBAL_gb_main,treename); if (ali_cont) { long prot = aw_root->awar(AWAR_TRE...
false
false
false
false
false
0
CreateDefaultExecutive() { if (vtkAlgorithm::DefaultExecutivePrototype) { return vtkAlgorithm::DefaultExecutivePrototype->NewInstance(); } return vtkStreamingDemandDrivenPipeline::New(); }
false
false
false
false
false
0
migrate_to_level(mtmp, tolev, xyloc, cc) register struct monst *mtmp; xchar tolev; /* destination level */ xchar xyloc; /* MIGR_xxx destination xy location: */ coord *cc; /* optional destination coordinates */ { register struct obj *obj; d_level new_lev; xchar xyflags; int num_segs = 0; /* count of worm segment...
false
false
false
false
false
0
headerClicked(int col) { // name columns should be sortable in both ways if (col == 3) return; // all others only descending sortByColumn(col, Qt::DescendingOrder); }
false
false
false
false
false
0
getpacket(int *we_know){ fd_set readfds; struct timeval tv; int bytes_per_packet=0; int ret; static const char *packet_id=NULL; static char buf[256]; const char *s; ssize_t r; bytes_per_packet=*we_know; D(printf("getpacket with %d\n",bytes_per_packet);) FD_ZERO(&readfds); FD_SET(upsfd,&re...
false
false
false
false
false
0
asd_find_dir_entry(struct asd_ocm_dir *dir, u8 type, u32 *offs, u32 *size) { int i; struct asd_ocm_dir_ent *ent; for (i = 0; i < dir->num_de; i++) { if (dir->entry[i].type == type) break; } if (i >= dir->num_de) return -ENOENT; ent = &dir->entry[i]; *offs = (u32) THREE_TO_NUM(ent->offs); *size ...
false
false
false
false
false
0
StrInStrNoCase(StringRef s1, StringRef s2) { size_t N = s2.size(), M = s1.size(); if (N > M) return StringRef::npos; for (size_t i = 0, e = M - N + 1; i != e; ++i) if (s1.substr(i, N).equals_lower(s2)) return i; return StringRef::npos; }
false
false
false
false
false
0
GMT_f_test (double chisq1, GMT_LONG nu1, double chisq2, GMT_LONG nu2, double *prob) { /* Routine to compute the probability that two variances are the same. chisq1 is distributed as chisq with nu1 degrees of freedom; ditto for chisq2 and nu2. If these are independent and we form the ratio F = max(chisq1,c...
false
false
false
false
false
0
MakeRfmLabel(NameDict name_dict, RfmStm stm) { RfmLabel prev; RfmLabel label; RfmLabel new; prev = NULL; for (label = RFM_ModuleCurrent->label_list; label != NULL; label = label->next) { if ((label->name_dict) && (label->name_dict == name_dict)) { r...
false
false
false
false
false
0
deleteHash(int index,int row, int column) { if (index<numberItems_) { int ipos = hashValue ( row, column ); while ( ipos>=0 ) { int j1 = hash_[ipos].index; if ( j1!=index) { ipos = hash_[ipos].next; } else { hash_[ipos].index=-1; // available break; } ...
false
false
false
false
false
0
CCthrottle(av) char *av[]; { char *p; p = av[0]; switch (Mode) { case OMpaused: if (*p && !EQ(p, ModeReason)) return "1 Already paused"; /* FALLTHROUGH */ case OMrunning: return CCblock(OMthrottled, p); case OMthrottled: return "1 Already throttled"; } return "1 unknown mod...
false
false
false
false
false
0
ParseConfig(char *file) { char line[256]; char *tline; FILE *ptr; ptr=fopen(file,"r"); if(ptr != (FILE *)NULL) { tline = fgets(line,(sizeof line)-1,ptr); while(tline != (char *)0) { while(isspace((unsigned char)*tline))tline++; if(strlen(tline)>1) { if(mystrncasecmp(tline, CatString3(Mo...
false
false
false
false
true
1
gst_rtp_mp4v_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) { GstRtpMP4VDepay *rtpmp4vdepay; GstBuffer *pbuf, *outbuf = NULL; GstRTPBuffer rtp = { NULL }; gboolean marker; rtpmp4vdepay = GST_RTP_MP4V_DEPAY (depayload); /* flush remaining data on discont */ if (GST_BUFFER_IS_DISCONT (bu...
false
false
false
false
false
0
mlxsw_pci_queue_group_fini(struct mlxsw_pci *mlxsw_pci, const struct mlxsw_pci_queue_ops *q_ops) { struct mlxsw_pci_queue_type_group *queue_group; int i; queue_group = mlxsw_pci_queue_type_group_get(mlxsw_pci, q_ops->type); for (i = 0; i < queue_group->count; i++) mlxsw_pci_queue_fini(mlxsw_pci, q_ops...
false
false
false
false
false
0
nicvf_snd_pkt_handler(struct net_device *netdev, struct cmp_queue *cq, struct cqe_send_t *cqe_tx, int cqe_type) { struct sk_buff *skb = NULL; struct nicvf *nic = netdev_priv(netdev); struct snd_queue *sq; struct sq_hdr_subdesc *hdr; struct sq_hdr_subdesc *tso_sqe; sq = &nic->qs->sq[cqe_tx->sq_idx]; ...
false
false
false
false
false
0
parse_variable(struct reader *reader, char **var_name, char **var_value) { const char *var_end = NULL; const char *value_start = NULL; char *line; int quote_count; line = reader_readline(reader, true); if (line == NULL) return -1; quote_count = strip_comments(line, 0); var_end = strchr(line, '='); if (va...
false
false
false
false
false
0
snapscani_check_device( int fd, SnapScan_Bus bus_type, char* vendor, char* model, SnapScan_Model* model_num ) { static const char me[] = "snapscani_check_device"; SANE_Status status = SANE_STATUS_GOOD; int supported_vendor = 0; int i; DBG (DL_CALL_TRACE, "%s()\n", me); /* c...
false
false
false
false
false
0
s48_cons_2(s48_call_t call, s48_ref_t v1, s48_ref_t v2) { s48_ref_t ref; ref = s48_make_local_ref(call, s48_allocate_stob(S48_STOBTYPE_PAIR, 2)); s48_unsafe_set_car_2(call, ref, v1); s48_unsafe_set_cdr_2(call, ref, v2); return ref; }
false
false
false
false
false
0
method_63(const int *account, int *weight) { if (0 != account[0]) return AccountNumberCheck::ERROR; // Added by Jens Gecius, check on invalid accountIDs number2Array("0121212000", weight); if (0 == account[0] && 0 == account[1] && 0 == account[2]) { // shift left, add 00 as subaccount id int account_buf[...
false
false
false
false
false
0
dupe_window_add_collection(DupeWindow *dw, CollectionData *collection) { CollectInfo *info; info = collection_get_first(collection); while (info) { dupe_files_add(dw, collection, info, NULL, FALSE); info = collection_next_by_info(collection, info); } dupe_check_start(dw); }
false
false
false
false
false
0
first_dirty_cnode(struct ubifs_nnode *nnode) { ubifs_assert(nnode); while (1) { int i, cont = 0; for (i = 0; i < UBIFS_LPT_FANOUT; i++) { struct ubifs_cnode *cnode; cnode = nnode->nbranch[i].cnode; if (cnode && test_bit(DIRTY_CNODE, &cnode->flags)) { if (cnode->level == 0) return cnode;...
false
false
false
false
false
0
dumpDatabases(PGconn *conn) { PGresult *res; int i; if (server_version >= 70100) res = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1"); else res = executeQuery(conn, "SELECT datname FROM pg_database ORDER BY 1"); for (i = 0; i < PQntuples(res); i++) { int ret; ...
false
false
false
false
true
1
EnterDup(Tcl_Interp *interp, SOCKET sock) { sock = ns_sockdup(sock); if (sock == INVALID_SOCKET) { Tcl_AppendResult(interp, "could not dup socket: ", ns_sockstrerror(errno), NULL); return TCL_ERROR; } return EnterSock(interp, sock); }
false
false
false
false
false
0
gt_encseq_access_type_str(GtEncseqAccessType at) { gt_assert((int) at < (int) GT_ACCESS_TYPE_UNDEFINED); return wpa[at].name; }
false
false
false
false
false
0
f_call(argvars, rettv) typval_T *argvars; typval_T *rettv; { char_u *func; dict_T *selfdict = NULL; if (argvars[1].v_type != VAR_LIST) { EMSG(_(e_listreq)); return; } if (argvars[1].vval.v_list == NULL) return; if (argvars[0].v_type == VAR_FUNC) func = argvars[0].vval.v_string;...
false
false
false
false
false
0
import_record(const jdns_rr_t *in) { QJDns::Record out; out.owner = QByteArray((const char *)in->owner); out.ttl = in->ttl; out.type = in->type; out.rdata = QByteArray((const char *)in->rdata, in->rdlength); // known if(in->haveKnown) { int type = in->type; if(type == QJDns::A || type == QJDns::Aaaa) {...
false
false
false
false
false
0
gp_processor_check_bank(enum proc_class class, int address) { int bank; switch (class) { case PROC_CLASS_EEPROM8: case PROC_CLASS_EEPROM16: assert(0); break; case PROC_CLASS_GENERIC: case PROC_CLASS_PIC12: case PROC_CLASS_SX: bank = (address >> 5) & 0x3; break; case PROC_CLASS_PIC14: ...
false
false
false
false
false
0
Perl_parse_label(pTHX_ U32 flags) { if (flags & ~PARSE_OPTIONAL) Perl_croak(aTHX_ "Parsing code internal error (%s)", "parse_label"); if (PL_lex_state == LEX_KNOWNEXT) { PL_parser->yychar = yylex(); if (PL_parser->yychar == LABEL) { char * const lpv = pl_yylval.pval; STRLEN llen = strlen(lpv); ...
false
false
false
false
false
0
as102_fe_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) { struct as102_state *state = fe->demodulator_priv; if (state->demod_stats.has_started) *ucblocks = state->demod_stats.bad_frame_count; else *ucblocks = 0; return 0; }
false
false
false
false
false
0
SetXValues( int start_index, int count, double x ) { wxCHECK_RET( Ok(), wxT("Invalid wxPlotData") ); if (count == 0) return; if (count < 0) count = M_PLOTDATA->m_count-start_index; int end_index = start_index + count - 1; wxPCHECK_MINMAX_RET(start_index, 0, M_PLOTDATA->m_count-1, wxT("Invalid starti...
false
false
false
false
false
0
deletekey (CONST int scancode) { struct keyrec *key; if (!(key = findkey (scancode))) { printf ("Key not found!\n"); return; } if (key->last) key->last->next = key->next; else ffirstkey = key->next; if (key->next) key->next->last = key->last; free (key); }
false
false
false
false
false
0
meta_frames_repaint_frame (MetaFrames *frames, Window xwindow) { MetaUIFrame *frame; frame = meta_frames_lookup_window (frames, xwindow); g_assert (frame); /* repaint everything, so the other frame don't * lag behind if they are exposed */ gdk_window_process_all_upda...
false
false
false
false
false
0
FreeBlocks() { for ( int i = 1; i < blocks_alloced_; ++i ) { // keep first block alloced free(first_blocks_[i].mem); first_blocks_[i].mem = NULL; first_blocks_[i].size = 0; } blocks_alloced_ = 1; if (overflow_blocks_ != NULL) { vector<AllocatedBlock>::iterator it; for (it = overflow_blocks_...
false
false
false
false
false
0
compute_merit (struct occurrence *occ) { struct occurrence *occ_child; basic_block dom = occ->bb; for (occ_child = occ->children; occ_child; occ_child = occ_child->next) { basic_block bb; if (occ_child->children) compute_merit (occ_child); if (flag_exceptions) bb = single_noncompl...
false
false
false
false
false
0
DateCalc_Weeks_in_Year(Z_int year) { return( 52 + ((DateCalc_Day_of_Week(year,1,1) == 4) or (DateCalc_Day_of_Week(year,12,31) == 4)) ); }
false
false
false
false
false
0
appliFontToViews(const QFont &font) { QList<Templates::TemplatesView *> allViews = Core::ICore::instance()->mainWindow()->findChildren<Templates::TemplatesView *>(); for(int i = 0; i < allViews.count(); ++i) { allViews.at(i)->setFont(font); } }
false
false
false
false
false
0
check_blank_configurations(void) { if (trusted_host_num == 0) { trusted_host_num = 1; prog_config.trusted[0] = (char *) malloc(10); sprintf(prog_config.trusted[0], "localhost"); } if (rejected_host_num == 0) { rejected_host_num = 1; prog_config.rejected[0] = (char *) malloc(8); sprintf(prog_config.re...
false
false
false
false
false
0
close_all_cb(GtkWidget *, gpointer data) { GtkWidget *list = (GtkWidget *)data; if (list) { scope_entry *current = root_scope; while (current) { GDK_THREADS_LEAVE(); if (current->sp) current->sp->stop(); GDK_THREADS_ENTER(); current = current->next; } } }
false
false
false
false
false
0
dvbsky_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) { if (dvb_usb_dvbsky_disable_rc) { rc->map_name = NULL; return 0; } rc->allowed_protos = RC_BIT_RC5; rc->query = dvbsky_rc_query; rc->interval = 300; return 0; }
false
false
false
false
false
0
resolve_generic_type(Oid declared_type, Oid context_actual_type, Oid context_declared_type) { if (declared_type == ANYARRAYOID) { if (context_declared_type == ANYARRAYOID) { /* Use actual type, but it must be an array */ Oid array_typelem = get_element_type(context_actual_type); if (!OidIs...
false
false
false
false
false
0
CreateNLSocket (void) { int sock; struct sockaddr_nl sa; int ret; sock = socket (AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); ret = fcntl (sock, F_GETFL, 0); if (ret != -1) { ret |= O_NONBLOCK; ret = fcntl (sock, F_SETFL, ret); if (ret < 0) return -1; } memset (&sa, 0, sizeof (sa)); if (sock < 0) retur...
false
false
false
false
false
0
create_semaphore(key_t key){ int id, retval; SEMUN s; id = semget(key, 1, IPC_CREAT|IPC_EXCL|0777); if (id < 0) { return ERR_SEMGET; } memset(&s, 0, sizeof(s)); s.val = 1; retval = semctl(id, 0, SETVAL, s); if (retval) { return ERR_SEMCTL; } return 0; }
false
false
false
false
false
0
gda_sqlite_free_cnc_data (SqliteConnectionData *cdata) { if (!cdata) return; if (cdata->gdacnc) g_object_remove_weak_pointer (G_OBJECT (cdata->gdacnc), (gpointer*) &(cdata->gdacnc)); if (cdata->connection) SQLITE3_CALL (sqlite3_close) (cdata->connection); g_free (cdata->file); if (cdata->types_hash) g_has...
false
false
false
false
false
0
make_ban_reason(const char *reason, const char *oper_reason) { static char buf[IRCD_BUFSIZE]; if(!EmptyString(oper_reason)) { snprintf(buf, sizeof(buf), "%s|%s", reason, oper_reason); return buf; } else return reason; }
false
false
false
false
false
0
currentChanged(const QModelIndex &current, const QModelIndex &previous) { Q_UNUSED(previous); removeButton->setEnabled(current.isValid()); int row = current.row(); moveUpButton->setEnabled(row > 0); moveDownButton->setEnabled(row != -1 && row < m_model.rowCount() - 1); }
false
false
false
false
false
0
pxav3_gen_init_74_clocks(struct sdhci_host *host, u8 power_mode) { struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_pxa *pxa = pltfm_host->priv; u16 tmp; int count; if (pxa->power_mode == MMC_POWER_UP && power_mode == MMC_POWER_ON) { dev_dbg(mmc_dev(host->mmc), "%s: slot->power_mode ...
false
false
false
false
false
0
dm_internal_resume_fast(struct mapped_device *md) { if (dm_suspended_md(md) || dm_suspended_internally_md(md)) goto done; dm_queue_flush(md); done: mutex_unlock(&md->suspend_lock); }
false
false
false
false
false
0
get_is_last_row(const Gtk::TreeModel::iterator& iter) const { if(iter) { //TODO: Avoid this. iter::operator() might not work properly with our custom tree model. return iter == get_last_row(); } else return false; }
false
false
false
false
false
0
setSocketOptions(int opts) { QMutexLocker locker(mutex()); KSocketBase::setSocketOptions(opts); // call parent bool result = socketDevice()->setSocketOptions(opts); // and set the implementation copyError(); return result; }
false
false
false
false
false
0
haltAll() { return ( transmit("H") && receive("H",NULL) ); }
false
false
false
false
false
0
refactor_eh_r (gimple_seq seq) { gimple_stmt_iterator gsi; gimple one, two; one = NULL; two = NULL; gsi = gsi_start (seq); while (1) { one = two; if (gsi_end_p (gsi)) two = NULL; else two = gsi_stmt (gsi); if (one && two && gimple_code (one) == GIMPLE_TRY && gimple_co...
false
false
false
false
false
0
key_ringing(struct unistimsession *pte, char keycode) { switch (keycode) { case KEY_FAV0: case KEY_FAV1: case KEY_FAV2: case KEY_FAV3: case KEY_FAV4: case KEY_FAV5: handle_key_fav(pte, keycode); break; case KEY_FUNC3: ignore_call(pte); break; case KEY_HANGUP: case KEY_FUNC4: discard_call(pte); bre...
false
false
false
false
false
0
GetStringTableString(P_WBXML_NODE node, long index) { /* Find the string table node */ P_WBXML_NODE pStringsNode = node; while (pStringsNode->m_parent) { pStringsNode = pStringsNode->m_parent; } while (pStringsNode->m_next) { pStringsNode = pStringsNode->m_next; } while (pStringsNode->m_prev && pString...
false
false
false
false
false
0
filtering(const IplImage &src, IplImage* rst) { for (int row = 0; row < src.height; row++) { uchar* pImg = (uchar*) (src.imageData + row * src.widthStep); uchar* pResult = (uchar*) (rst->imageData + row * rst->widthStep); for (int col = 0; col < src.width; col++) { for (int ch...
false
false
false
false
false
0
server_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, gf_dirent_t *entries, dict_t *xdata) { gfs3_readdir_rsp rsp = {0,}; server_state_t *state = NULL; rpcsvc_request_t *req = NULL; int ret = 0;...
false
false
false
false
false
0
sspm_property_name(const char* line) { static char name[1024]; char *c = strchr(line,':'); if(c != 0){ strncpy(name,line,(size_t)c-(size_t)line); name[(size_t)c-(size_t)line] = '\0'; return name; } else { return 0; } }
true
true
false
false
false
1
printgroup(char *name) { struct grouphead *gh; struct group *gp; if ((gh = findgroup(name)) == NULL) { printf(catgets(catd, CATSET, 202, "\"%s\": not a group\n"), name); return; } printf("%s\t", gh->g_name); for (gp = gh->g_list; gp != NULL; gp = gp->ge_link) printf(" %s", gp->ge_name); putchar('\n');...
false
false
false
false
true
1
_bfd_elf_add_dynamic_entry (struct bfd_link_info *info, bfd_vma tag, bfd_vma val) { struct elf_link_hash_table *hash_table; const struct elf_backend_data *bed; asection *s; bfd_size_type newsize; bfd_byte *newcontents; Elf_Internal_Dyn dyn; hash_table = elf_hash_table (info); if (! is_elf...
false
false
false
true
false
1
kanjiputs3(s, cx2, len2, ptr, top) CONST char *s; int cx2, len2, ptr, top; { int n, width; if (!searchmode || ptr + len2 <= top || ptr >= cx2) { VOID_C kanjiputs2(s, len2, ptr); return; } width = cx2 - top; n = top - ptr; if (n <= 0) width += n; else { VOID_C kanjiputs2(s, n, ptr); ptr += n; len2 -= ...
false
false
false
false
false
0
CCinit(context_type *context) { struct CCpool *new = (struct CCpool *) malloc(sizeof(struct CCpool)); /* Set context->CCroot to 0 if new == 0 to tell CCdestroy to lay off */ context->CCroot = context->CCcurrent = new; if (new == 0) { CCout_of_memory(context); } new->next = NULL; new-...
false
false
false
false
false
0
extract_bo(uint32 insn, bool *invalid) { uint32 value; value = (insn >> 21) & 0x1f; if (invalid != NULL && !valid_bo(value)) *invalid = true; return value; }
false
false
false
false
false
0
get_augroup_name(xp, idx) expand_T *xp UNUSED; int idx; { if (idx == augroups.ga_len) /* add "END" add the end */ return (char_u *)"END"; if (idx >= augroups.ga_len) /* end of list */ return NULL; if (AUGROUP_NAME(idx) == NULL) /* skip deleted entries */ return (char_u *)""; return AUGROUP...
false
false
false
false
false
0
animationState(const QStyleOption &option, const QModelIndex &index, const QAbstractItemView *view) { // We can't do animations reliably when an item is being dragged, since that // item will be dra...
false
false
false
false
false
0
gfs_xmlattr_ctx_free(struct gfs_xmlattr_ctx *ctxp, int freepath) { if (ctxp != NULL) { gfs_xmlattr_ctx_free_entries(ctxp, freepath); free(ctxp->path); free(ctxp->expr); free(ctxp->cookie_path); free(ctxp->cookie_attrname); free(ctxp->workpath); free(ctxp); } }
false
false
false
false
false
0
UnsetRace(ARegionArray *pArr) { int x, y; for(x = 0; x < pArr->x; x++) { for(y = 0; y < pArr->y; y++) { ARegion *reg = pArr->GetRegion(x, y); if(!reg) continue; reg->race = - 1; } } }
false
false
false
false
false
0
btree_remove(struct btree *btree, const void *key) { btree_iterator iter; bool success = false; bool multi = btree->multi; do { if (btree_find_first(btree, key, iter)) { btree_remove_at(iter); success = true; } } while (multi); return success; }
false
false
false
false
false
0
sanitname(char *name) { while(*name) { if(!isascii(*name) || strchr("%\\\t\n\r", *name)) *name = '_'; name++; } }
false
false
false
false
false
0
__d_obtain_alias(struct inode *inode, int disconnected) { static const struct qstr anonstring = QSTR_INIT("/", 1); struct dentry *tmp; struct dentry *res; unsigned add_flags; if (!inode) return ERR_PTR(-ESTALE); if (IS_ERR(inode)) return ERR_CAST(inode); res = d_find_any_alias(inode); if (res) goto out_...
false
false
false
false
false
0
RefUnderlyingRasterBand() { poUnderlyingMainRasterBand = poMainBand->RefUnderlyingRasterBand(); if (poUnderlyingMainRasterBand == NULL) return NULL; nRefCountUnderlyingMainRasterBand ++; return poUnderlyingMainRasterBand->GetMaskBand(); }
false
false
false
false
false
0
get_faction_from_id(int faction_id) { if ((faction_id < 0) || (faction_id >= (sizeof(factions) / sizeof(factions[0])))) { ErrorMessage(__FUNCTION__, "Malformed faction id! Faction %d does not exist.", PLEASE_INFORM, IS_WARNING_ONLY, faction_id); return factions[FACTION_SELF].name; } return factions[faction_id]....
false
false
false
false
false
0
FBottomTransform(SplineChar *sc,int layer,ItalicInfo *ii) { if ( ii->f_rotate_top ) FBottomFromTop(sc,layer,ii); else FBottomGrows(sc,layer,ii); }
false
false
false
false
false
0
gf_clock_buffer_on(GF_Clock *ck) { gf_mx_p(ck->mx); if (!ck->Buffering) gf_clock_pause(ck); ck->Buffering += 1; gf_mx_v(ck->mx); }
false
false
false
false
false
0
eval(const SeExprFuncNode* node, SeVec3d& result) const { SeVec3d param; node->child(0)->eval(param); bool processVec = node->child(0)->isVec(); CurveData<double> *data = (CurveData<double> *) node->getData(); if (processVec)...
false
false
false
false
false
0
parse_greeting(mailimap * session, struct mailimap_greeting ** result) { size_t indx; struct mailimap_greeting * greeting; int r; indx = 0; session->imap_response = NULL; r = mailimap_greeting_parse(session->imap_stream, session->imap_stream_buffer, &indx, &greeting, session->imap_pr...
false
false
false
false
false
0
data_vels(int n, char *buf) { int j,m,tagdata; char *next; next = strchr(buf,'\n'); *next = '\0'; int nwords = count_words(buf); *next = '\n'; if (nwords != avec->size_data_vel) error->all(FLERR,"Incorrect velocity format in data file"); char **values = new char*[nwords]; // loop over lines of...
false
false
false
false
false
0
UploadFile(const char* url, const char* filename) { if(m_APIToken == "") { std::cerr << "Token should be defined to upload to MIDAS."; std::cerr << "Please use the Login() function to get a token." << std::endl; this->GetRestXMLParser()->SetErrorMessage("Cannot push using anonymous access."); retu...
false
false
false
false
false
0
mei_ioctl_connect_client(struct file *file, struct mei_connect_client_data *data) { struct mei_device *dev; struct mei_client *client; struct mei_me_client *me_cl; struct mei_cl *cl; int rets; cl = file->private_data; dev = cl->dev; if (dev->dev_state != MEI_DEV_ENABLED) return -ENODEV; if (cl->state !...
false
false
false
false
false
0
playlistLayoutChanged() { if ( LayoutManager::instance()->activeLayout().inlineControls() ) m_animationTimer->start(); else m_animationTimer->stop(); // -- update the tooltip columns in the playlist model bool tooltipColumns[Playlist::NUM_COLUMNS]; for( int i=0; i<Playlist::NUM_COLU...
false
false
false
false
false
0
cp_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value) { unsigned long quirks = (unsigned long)hid_get_drvdata(hdev); if (!(hdev->claimed & HID_CLAIMED_INPUT) || !field->hidinput || !usage->type || !(quirks & CP_2WHEEL_MOUSE_HACK)) return 0; if (usage->hid == 0x0009...
false
false
false
false
false
0
typicalValue(double *x, unsigned int length, vector<double const *> const &par, vector<unsigned int> const &len, double const *lower, double const *upper) const { double alphasum = 0.0; for (unsigned int i = 0; i < length; ++i) { alphasum += ALPHA(par)[i...
false
false
false
false
false
0
readXmlFile(const char *ifname, DcmFileFormat &fileformat, E_TransferSyntax &xfer, const OFBool metaInfo, const OFBool checkNamespace, const OFBool validateDocument)...
false
false
false
false
false
0
stat_to_cpio (struct cpio_file_stat *hdr, struct stat *st) { hdr->c_dev_maj = major (st->st_dev); hdr->c_dev_min = minor (st->st_dev); hdr->c_ino = st->st_ino; /* For POSIX systems that don't define the S_IF macros, we can't assume that S_ISfoo means the standard Unix S_IFfoo bit(s) are set. So do it...
false
false
false
false
false
0
ompi_coll_tuned_allgather_intra_do_forced(void *sbuf, int scount, struct ompi_datatype_t *sdtype, void* rbuf, int rcount, struct ompi_datatype_t *rdtype, ...
false
false
false
false
false
0
setContent( QString text, QString *errorMsg, int *errorLine, int *errorColumn ) { clear(); QString prefix = "<?xml version=\"2.0\"?>\n"; prefix.append( entityDeclarations() ); uint prefix_lines = 0; for ( int i = 0; i < prefix.length(); ++i ) { if ( pre...
false
false
false
false
false
0