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
ListTestsMatchingFilter() { for (size_t i = 0; i < test_cases_.size(); i++) { const TestCase* const test_case = test_cases_[i]; bool printed_test_case_name = false; for (size_t j = 0; j < test_case->test_info_list().size(); j++) { const TestInfo* const test_info = test_case->test_info_lis...
false
false
false
false
false
0
is_associated_namespace (tree current, tree scope) { tree seen = NULL_TREE; tree todo = NULL_TREE; tree t; while (1) { if (scope == current) return true; seen = tree_cons (scope, NULL_TREE, seen); for (t = DECL_NAMESPACE_ASSOCIATIONS (scope); t; t = TREE_CHAIN (t)) if (!purpose_member (T...
false
false
false
false
false
0
ecore_con_client_ip_get(Ecore_Con_Client *cl) { if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT)) { ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT, "ecore_con_client_ip_get"); return NULL; } if (!cl->ip) cl->ip = _ecore_con_pretty_ip(cl->client_addr); return cl->ip; }
false
false
false
false
false
0
slotSettingsGridRemoval() { slotStatusNormalMsg(QString(tr("Configuring grid removal..."))); DigitDoc* doc = activeDocument(); if (doc) { CoordSettings coord = doc->coordSettings(); GridRemovalSettings grid = doc->gridRemovalSettings(); GridRemovalDlg* dlg = new GridRemovalDlg(doc->title(), &...
false
false
false
false
false
0
post_process() { std::list<ast_assign*>::iterator i; for (i = target_list.begin(); i != target_list.end(); i++) { ast_assign* next = *i; post_process_item(next); } target_list.clear(); }
false
false
false
false
false
0
FuncIO_fstat(Obj self,Obj fd) { Int res; Obj rec; if (!IS_INTOBJ(fd)) { SyClearErrorNo(); return Fail; } else { res = fstat(INT_INTOBJ(fd),&ourfstatbuf); if (res < 0) { SySetErrorNo(); return Fail; } rec = NEW_PREC(0); AssPRec(rec,RNamName("dev"),MyObjIn...
false
false
false
false
false
0
parse_errorlog_item(apr_pool_t *p, ap_errorlog_format_item *it, const char **sa) { const char *s = *sa; ap_errorlog_handler *handler; int i; if (*s != '%') { if (*s == ' ') { it->flags |= AP_ERRORLOG_FLAG_FIELD_SEP; } return parse_err...
false
false
false
false
false
0
load_property(const XmlNode *data, gpointer user) { Style *stl = user; const gchar *name; if(xml_get_text(data, "name", &name)) { GdkColor color; const gchar *text; if(xml_get_color(data, "color", &color)) stl_style_property_set_color(stl, name, &color); else if(xml_get_text(data, "icon", &text)) s...
false
false
false
false
false
0
workdir_iterator_test( const char *sandbox, const char *start, const char *end, int expected_count, int expected_ignores, const char **expected_names, const char *an_ignored_name) { git_iterator *i; const git_index_entry *entry; int count = 0, count_all = 0; git_repository *repo = cl_git_sandbox_init(sandbox...
false
false
false
false
false
0
checkargs (int argc, char **argv, bool_t *double_resolution, bool_t *panel, int *fps, char **image_name, fiasco_d_options_t **options) /* * Check validness of command line parameters and of the parameter files. * * Return value. * index in argv of the first argv-element that is not an option. * * Side effe...
false
false
false
false
false
0
ldm_get_vnum (const u8 *block) { u64 tmp = 0; u8 length; BUG_ON (!block); length = *block++; if (length && length <= 8) while (length--) tmp = (tmp << 8) | *block++; else ldm_error ("Illegal length %d.", length); return tmp; }
false
false
false
false
false
0
comparemmsis(const GtMMsearchiterator *mmsi1, const GtMMsearchiterator *mmsi2) { if (gt_mmsearchiterator_isempty(mmsi1)) { if (!gt_mmsearchiterator_isempty(mmsi2)) { fprintf(stderr,"mmsi1 is empty but mmsi2 not\n"); exit(GT_EXIT_PROGRAMMING_ERROR); } } else { ...
false
false
false
false
false
0
Insert_Only_Digit (GtkEditable *editable, const gchar *inserted_text, gint length, gint *position, gpointer data) { int i = 1; // Ignore first character int j = 1; gchar *result; if (length<=0 || !inserted_text) return; if (!isdigit((guchar)inserted_text[0]) && inse...
false
false
false
false
false
0
length_NegTokenResp(const NegTokenResp *data) { size_t ret = 0; if((data)->negResult){ size_t Top_tag_oldret = ret; ret = 0; { int enumint = *(data)->negResult; ret += der_length_integer(&enumint); } ret += 1 + der_length_len (ret); ret += 1 + der_length_len (ret); ret += Top_tag_oldret; } if((data)->supportedMech){ si...
false
false
false
false
false
0
ipmidetect_errnum (ipmidetect_t handle) { if (!handle) return (IPMIDETECT_ERR_HANDLE_NULL); else if (handle->magic != IPMIDETECT_MAGIC_NUM) return (IPMIDETECT_ERR_HANDLE_INVALID); return (handle->errnum); }
false
false
false
false
false
0
hpet_work(struct work_struct *w) { struct hpet_dev *hdev; int cpu = smp_processor_id(); struct hpet_work_struct *hpet_work; hpet_work = container_of(w, struct hpet_work_struct, work.work); hdev = hpet_get_unused_timer(); if (hdev) init_one_hpet_msi_clockevent(hdev, cpu); complete(&hpet_work->complete); }
false
false
false
false
false
0
ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf, u32 len, u32 request) { struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); u8 *tbuf = NULL; int ret; bool bounced = false; if (request & HIF_BLOCK_BASIS) len = round_down(len, HIF_MBOX_BLOCK_SIZE); if (buf_needs_bounce(buf)) { if...
false
true
false
false
false
1
ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep) { int totlen; u_int32_t t; if (p[0] & 0x80) totlen = 4; else totlen = 4 + EXTRACT_16BITS(&p[2]); if (ep < p + totlen) { ND_PRINT((ndo,"[|attr]")); return ep + 1; } ND_PRINT((ndo,"(")); t = EXTRACT_16BITS(&p[0]) & 0x7fff; ND_...
false
false
false
false
false
0
setButtonMenu( ButtonCode id, QMenu *menu, ButtonPopupMode popupmode) { KPushButton *button = this->button( id ); if ( button ) { if (popupmode==InstantPopup) button->setMenu( menu ); else button->setDelayedMenu(menu); } }
false
false
false
false
false
0
tick_init_jiffy_update(void) { ktime_t period; write_seqlock(&jiffies_lock); /* Did we start the jiffies update yet ? */ if (last_jiffies_update.tv64 == 0) last_jiffies_update = tick_next_period; period = last_jiffies_update; write_sequnlock(&jiffies_lock); return period; }
false
false
false
false
false
0
CalcHashKey (void) /*************************************************************************** * * Calculates the hashkey for the current board position. We sometimes * need to do this especially when loading an EPD position. * Note: The hashkey is a 64 bit unsigned integer number. * Added in pawnhashkey...
false
false
false
false
false
0
copy(const string media, const string selector, const string media_new, const string selector_new) { for(int k = 0; k < css[media][selector].size(); k++) { string property = css[media][selector].at(k); string value = css[media][selector][property]; add(media_new,selector_new,property,value); } }
false
false
false
false
false
0
DisableLOD( int id ) { int index = this->ConvertIDToIndex( id ); if ( index == VTK_INVALID_LOD_INDEX || index == VTK_INDEX_NOT_IN_USE ) { return; } this->LODs[index].State = 0; }
false
false
false
false
false
0
mark_core_as_ready(struct iforce *iforce, unsigned short addr) { int i; if (!iforce->dev->ff) return 0; for (i = 0; i < iforce->dev->ff->max_effects; ++i) { if (test_bit(FF_CORE_IS_USED, iforce->core_effects[i].flags) && (iforce->core_effects[i].mod1_chunk.start == addr || iforce->core_effects[i]....
false
true
false
false
false
1
ib_device_check_mandatory(struct ib_device *device) { #define IB_MANDATORY_FUNC(x) { offsetof(struct ib_device, x), #x } static const struct { size_t offset; char *name; } mandatory_table[] = { IB_MANDATORY_FUNC(query_device), IB_MANDATORY_FUNC(query_port), IB_MANDATORY_FUNC(query_pkey), IB_MANDATORY_FUN...
false
false
false
false
false
0
slotClear() { Board b; b.setAt(e1, WhiteKing); b.setAt(e8, BlackKing); setBoard(b); }
false
false
false
false
false
0
reg_classes_intersect_p (c1, c2) enum reg_class c1; enum reg_class c2; { #ifdef HARD_REG_SET register #endif HARD_REG_SET c; if (c1 == c2) return 1; if (c1 == ALL_REGS || c2 == ALL_REGS) return 1; COPY_HARD_REG_SET (c, reg_class_contents[(int) c1]); AND_HARD_REG_SET (c, reg_class_contents...
false
false
false
false
false
0
handle_gsettings_settings (GSearchWindow * gsearch) { if (g_settings_get_boolean (gsearch->gnome_search_tool_settings, "show-additional-options")) { if (gtk_widget_get_visible (gsearch->available_options_vbox) == FALSE) { gtk_expander_set_expanded (GTK_EXPANDER (gsearch->show_more_options_expander), TRUE); gtk...
false
false
false
false
false
0
asn1p_wsyntx_chunk_fromstring(char *token, int do_copy) { asn1p_wsyntx_chunk_t *wc; if(do_copy) { static asn1p_wsyntx_chunk_t tmp; tmp.type = WC_LITERAL; tmp.content.token = token; wc = asn1p_wsyntx_chunk_clone(&tmp); } else { wc = asn1p_wsyntx_chunk_new(); if(wc) { wc->type = WC_LITERAL; wc->cont...
false
false
false
false
false
0
mpt3sas_base_sas_iounit_control(struct MPT3SAS_ADAPTER *ioc, Mpi2SasIoUnitControlReply_t *mpi_reply, Mpi2SasIoUnitControlRequest_t *mpi_request) { u16 smid; u32 ioc_state; unsigned long timeleft; bool issue_reset = false; int rc; void *request; u16 wait_state_count; dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n...
false
false
false
false
false
0
rndis_do_config(struct usb_configuration *c) { int status; /* FIXME alloc iConfiguration string, set it in c->strings */ if (gadget_is_otg(c->cdev->gadget)) { c->descriptors = otg_desc; c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; } f_rndis = usb_get_function(fi_rndis); if (IS_ERR(f_rndis)) return PTR_ERR(f...
false
false
false
false
false
0
slot_abone_word_board() { DBTREE::add_abone_word_board( m_url_article, m_drawarea->str_selection() ); DBTREE::board_save_info( m_url_article ); }
false
false
false
false
false
0
cleanup() { if (imp_ != 0) { imp_ = 0; // we must dispose of the DbEnv object if // we created it. This will be the case // if a NULL DbEnv was passed into the constructor. // The underlying DB_ENV object will be inaccessible // after the close, so we must clean it up now. // if ((flags_ & DB_CXX_PRI...
false
false
false
false
false
0
okname(cp0) char *cp0; { int c; unsigned char *cp; cp = (unsigned char *)cp0; do { c = *cp; if (c & 0200) goto bad; if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-') goto bad; } while (*++cp); return (1); bad: warnx("%s: invalid user name", cp0); return (0); }
false
false
false
false
false
0
my_open(char *dev, int rw, int silent) { int fd, mode; mode = (rw ? O_RDWR : O_RDONLY); fd = open(dev, mode); if (fd < 0 && !silent) { perror(dev); if (rw) fatal(_("cannot open %s read-write\n"), dev); else fatal(_("cannot open %s for reading\n"), dev); } return fd; }
false
false
false
false
true
1
cqueue_push( struct cqueue *queue_p, struct tcp_connection *elem_p ) { struct tcp_connection *old_head = queue_p->head; elem_p->prev = NULL; if ( old_head != NULL ) { old_head->prev = elem_p; } elem_p->next = old_head; queue_p->head = elem_p; queu...
false
false
false
false
false
0
SRP_Verify_B_mod_N(BIGNUM *B, BIGNUM *N) { BIGNUM *r; BN_CTX *bn_ctx; int ret = 0; if (B == NULL || N == NULL || (bn_ctx = BN_CTX_new()) == NULL) return 0; if ((r = BN_new()) == NULL) goto err; /* Checks if B % N == 0 */ if (!BN_nnmod(r,B,N,bn_ctx)) goto err; ret = !BN_is_zero(r); err: BN_CTX_free(...
false
false
false
false
false
0
generate_all_perms( const vector<string>& classes ){ // determine all alternative analyses, remember the largest // and store every part in a vector of string vectors int largest_anal=1; vector<vector<string> > classParts; classParts.resize( classes.size() ); for ( unsigned int j=0; j< classes.size(); ++j )...
false
false
false
false
false
0
ladish_studio_jack_conf_clear(void) { struct list_head * node_ptr; INIT_LIST_HEAD(&g_studio.jack_params); /* we will destroy the leaves as part of tree destroy traversal */ while (!list_empty(&g_studio.jack_conf)) { node_ptr = g_studio.jack_conf.next; list_del(node_ptr); ladish_studio_jack_conf_con...
false
false
false
false
false
0
start_game(Comm_game *game,Level *level,Config *config, _Player **players, int *playermapping,int localplayers) { Model *m; Graphics *g; Local_io *io; int x; /* setup local io for our players */ io = setup_player_io(localplayers,config); setup_model_graphics(level,config,players,&m,&g); del...
false
false
false
false
true
1
nntp_flush(struct nntp *nntp) { ssize_t status; if (nntp->out.left == 0) return true; status = xwrite(nntp->out_fd, nntp->out.data, nntp->out.left); if (status < 0) return false; nntp->out.left = 0; nntp->out.used = 0; return true; }
false
false
false
false
false
0
ena_config_host_info(struct ena_com_dev *ena_dev) { struct ena_admin_host_info *host_info; int rc; /* Allocate only the host info */ rc = ena_com_allocate_host_info(ena_dev); if (rc) { pr_err("Cannot allocate host info\n"); return; } host_info = ena_dev->host_attr.host_info; host_info->os_type = ENA_ADMI...
false
false
false
false
false
0
sashimi_close (sashimiConnection* conn) { if (conn->connection != NULL) { g_object_unref(conn->connection); conn->connection = NULL; } if (conn->stream.input != NULL) { g_object_unref(conn->stream.input); conn->stream.input = NULL; } if (conn->stream.output != NULL) { g_object_unref(conn->stream.out...
false
false
false
false
false
0
orte_ras_loadleveler_discover(opal_list_t* nodelist) { orte_node_t *node; opal_list_item_t* item; FILE *fp; char *hostname; char *filename; char input[LL_FILE_MAX_LINE_LENGTH]; /* Ignore anything that the user already specified -- we're getting nodes only from LoadLeveler. */ fil...
true
true
false
false
true
1
eet_data_node_encode_cipher(Eet_Node *node, const char *cipher_key, int *size_ret) { void *ret = NULL; void *ciphered = NULL; unsigned int ciphered_len = 0; int size; ret = _eet_data_dump_encode(EET_G_UNKNOWN, NULL, node, &size); if (ci...
false
false
false
false
false
0
gnm_style_conditions_new (Sheet *sheet) { GnmStyleConditions *res; g_return_val_if_fail (IS_SHEET (sheet), NULL); res = g_object_new (gnm_style_conditions_get_type (), NULL); res->sheet = sheet; return res; }
false
false
false
false
false
0
mg_perchan_menu_item (char *label, GtkWidget *menu, guint8 *setting, guint global) { guint8 initial_value = *setting; /* if it's using global value, use that as initial state */ if (initial_value == SET_DEFAULT) initial_value = global; menu_toggle_item (label, menu, mg_set_guint8, setting, initial_value); }
false
false
false
false
false
0
xmmsc_playlist_create (xmmsc_connection_t *c, const char *playlist) { xmmsc_result_t *res; xmmsv_coll_t *plcoll; x_check_conn (c, NULL); x_api_error_if (!playlist, "playlist name cannot be NULL", NULL); plcoll = xmmsv_coll_new (XMMS_COLLECTION_TYPE_IDLIST); res = xmmsc_coll_save (c, plcoll, playlist, XMMS_COLLE...
false
false
false
false
false
0
get_valid_mirror(struct mirror_set *ms) { struct mirror *m; for (m = ms->mirror; m < ms->mirror + ms->nr_mirrors; m++) if (!atomic_read(&m->error_count)) return m; return NULL; }
false
false
false
false
false
0
gzclose_r(gzFile file) { int ret, err; gz_statep state; /* get internal structure */ if (file == NULL) return Z_STREAM_ERROR; state = (gz_statep)file; /* check that we're reading */ if (state->mode != GZ_READ) return Z_STREAM_ERROR; /* free memory and close file */ if (state->s...
false
false
false
false
false
0
reload_snippets_group_combo_box (SnippetsEditor *snippets_editor) { SnippetsEditorPrivate *priv = NULL; GtkTreeIter iter; gchar *cur_group_name = NULL, *parent_group_name = NULL; gint i = 0; /* Assertions */ g_return_if_fail (ANJUTA_IS_SNIPPETS_EDITOR (snippets_editor)); priv = ANJUTA_SNIPPETS_EDITOR_GET_PRIVA...
false
false
false
false
false
0
create_encode( const GPixmap &pm, const GP<GBitmap> gmask, CRCBMode crcbmode) { IWPixmap::Encode *pix=new IWPixmap::Encode(); GP<IW44Image> retval=pix; pix->init(pm, gmask,(IWPixmap::Encode::CRCBMode)crcbmode); return retval; }
false
false
false
false
false
0
ReadUILayout() { GConfClient *client; gint numeric; client = gconf_client_get_default(); numeric = gconf_client_get_int(client, GCONF_PATH "/peer_window_width", NULL); numeric = numeric ? numeric : 570; g_datalist_set_data(&dtset, "window-width", GINT_TO_POINTER(numeric...
false
false
false
false
false
0
writeColorEntry(const FXchar *section,const FXchar *key,FXColor val){ if(!section || !section[0]){ fxerror("FXSettings::writeColorEntry: bad section argument.\n"); } if(!key || !key[0]){ fxerror("FXSettings::writeColorEntry: bad key argument.\n"); } FXStringDict *group=insert(section); if(group){ FXchar buf...
false
false
false
false
false
0
eat_ws(CONF *conf, char *p) { while (IS_WS(conf,*p) && (!IS_EOF(conf,*p))) p++; return(p); }
false
false
false
false
false
0
ql_is_neg_pause(struct ql3_adapter *qdev) { if (ql_is_fiber(qdev)) return ql_is_petbi_neg_pause(qdev); else return ql_is_phy_neg_pause(qdev); }
false
false
false
false
false
0
build_FDArray_sub_font(i_ctx_t *i_ctx_p, ref *op, gs_font_base **ppfont, font_type ftype, gs_memory_type_ptr_t pstype, const build_proc_refs * pbuild, build_font_options_t ignore_options) { gs_font *pfont; int code = bui...
false
false
false
false
false
0
dyn_castZExtVal(Value *V, Type *Ty) { if (ZExtInst *Z = dyn_cast<ZExtInst>(V)) { if (Z->getSrcTy() == Ty) return Z->getOperand(0); } else if (ConstantInt *C = dyn_cast<ConstantInt>(V)) { if (C->getValue().getActiveBits() <= cast<IntegerType>(Ty)->getBitWidth()) return ConstantExpr::getTrunc(C, T...
false
false
false
false
false
0
lperror(int level, const char * format, ...) { char logmsg[LOG_MSG_LENGTH]; va_list vptr; if (!logpriv) log_reinit(); if (logpriv->level < level) return; va_start(vptr, format); vsnprintf(logmsg, LOG_MSG_LENGTH, format, vptr); va_end(vptr); if (logpriv->daemon) syslog(level, "%s: %s", logmsg, strerror...
true
true
false
false
true
1
sha1_pos(const unsigned char *sha1, void *table, size_t nr, sha1_access_fn fn) { size_t hi = nr; size_t lo = 0; size_t mi = 0; if (!nr) return -1; if (nr != 1) { size_t lov, hiv, miv, ofs; for (ofs = 0; ofs < 18; ofs += 2) { lov = take2(fn(0, table) + ofs); hiv = take2(fn(nr - 1, table) + ofs)...
false
false
false
false
false
0
test_ascii_xdigit_value () { int i; gchar j; i = g_ascii_xdigit_value ('9' + 1); if (i != -1) return FAILED ("'9' + 1"); i = g_ascii_xdigit_value ('0' - 1); if (i != -1) return FAILED ("'0' - 1"); i = g_ascii_xdigit_value ('a' - 1); if (i != -1) return FAILED ("'a' - 1"); i = g_ascii_xdigit_value ('f' +...
false
false
false
false
false
0
clutter_text_buffer_insert_text (ClutterTextBuffer *buffer, guint position, const gchar *chars, gint n_chars) { ClutterTextBufferClass *klass; ClutterTextBufferPrivate *pv; guint len...
false
false
false
false
false
0
_dxf_DeleteDisplayListHash(HashTable ht) { DLHashP ptr; if (ht) { DXInitGetNextHashElement(ht); while (NULL != (ptr = (DLHashP)DXGetNextHashElement(ht))) { if (ptr->obj) DXDelete(ptr->obj); } DXDestroyHash(ht); } }
false
false
false
false
false
0
contentsRect() const { int w = indent() ? style()->pixelMetric( QStyle::PM_DefaultFrameWidth ) : 0; //TODO: is the height:width ratio of an indicator arrow always 2:1? hm. int iw = (w < ARROWSIZE) ? ARROWSIZE : w; if ( orientation() == Qt::Vertical ) { if ( arrowDirection() == Qt::RightArrow ) ...
false
false
false
false
false
0
epson1_interpret_value(struct ifd_entry *entry_ptr) { int chpr = 0; if(entry_ptr && (PRINT_VALUE)) { switch(entry_ptr->tag) { case 0x0201: /* Compression Mode */ print_startvalue(); /* 'Quality' is a mix of this and image size. */ ...
false
false
false
false
false
0
gimmix_play (MpdObj *mo) { if (mpd_playlist_get_playlist_length (mo)) { int state; state = mpd_player_get_state (mo); if (state == MPD_PLAYER_PAUSE || state == MPD_PLAYER_STOP) { mpd_player_play (mo); return true; } else if (state == MPD_PLAYER_PLAY) { mpd_player_pause (mo); return false...
false
false
false
false
false
0
WriteBaseTransitionMatricesFlat_Headers(FILE *f, TStateModel *model) { return f ? sv_WriteBaseTransitionMatricesFlat_Headers(f,model->sv,"") : 0; }
false
false
false
false
false
0
ufshcd_clk_scaling_start_busy(struct ufs_hba *hba) { if (!ufshcd_is_clkscaling_enabled(hba)) return; if (!hba->clk_scaling.is_busy_started) { hba->clk_scaling.busy_start_t = ktime_get(); hba->clk_scaling.is_busy_started = true; } }
false
false
false
false
false
0
ocfs2_new_dx_should_be_inline(struct inode *dir, struct buffer_head *di_bh) { int dirent_count = 0; char *de_buf, *limit; struct ocfs2_dir_entry *de; struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; de_buf = di->id2.i_data.id_data; limit = de_buf + i_size_read(dir); while (de_buf < limit) ...
false
false
false
false
false
0
writeColourValue(const ColourValue &colour, bool writeAlpha) { writeValue(StringConverter::toString(colour.r)); writeValue(StringConverter::toString(colour.g)); writeValue(StringConverter::toString(colour.b)); if (writeAlpha) writeValue(StringConverter::toString(colour.a)...
false
false
false
false
false
0
gettrain ( TFILE *f, char *s, int n, int *good ) { int err=0, c, i=0, maxrunl=0, runl=0 ; ckcmd ( f, &err, s, T2, CONNECT ) ; if ( ! err ) { for ( i=0 ; ( c = tgetd ( f, T3S ) ) >= 0 ; i++ ) if ( c ) { if ( runl > maxrunl ) maxrunl = runl ; runl = 0 ; } else { runl ++ ; ...
false
false
false
false
false
0
test_slist_find () { GSList *list = g_slist_prepend (NULL, "three"); GSList *found; char *data; list = g_slist_prepend (list, "two"); list = g_slist_prepend (list, "one"); data = "four"; list = g_slist_append (list, data); found = g_slist_find (list, data); if (found->data != data) return FAILED ("Find...
false
false
false
false
false
0
gupnp_service_proxy_begin_action_hash (GUPnPServiceProxy *proxy, const char *action, GUPnPServiceProxyActionCallback callback, gpointer ...
false
false
false
false
false
0
checkExistsWithIntegerValue(DcmItem *dataset, const DcmTagKey &key, const long value, const char *filename, ...
false
false
false
false
false
0
parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER) { switch (key) { case 'l': logging = 1; break; case 'g': free (group); group = xstrdup (arg); break; case 'n': suppress_naks = 1; break; case 's': chrootdir = xstrdu...
false
false
false
false
false
0
mimeData(const QList<QListWidgetItem *> items) const { if (items.count()>1) { throw "PartsBinListView::mimeData too many items"; } if(items.count()==1) { QListWidgetItem * item = items.at(0); ModelPart * modelPart = itemModelPart(item); QByteArray itemData; QDataStream dataStream(&itemData, QIODevice::Wri...
false
false
false
false
false
0
peas_engine_class_init (PeasEngineClass *klass) { GType the_type = G_TYPE_FROM_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->constructor = peas_engine_constructor; object_class->set_property = peas_engine_set_property; object_class->get_property = peas_engine_get_property;...
false
false
false
false
false
0
Execute(ParticleGroup *group) { // Step particle positions forward by dt, and age the particles. for(int i = 0; i < group->p_count; i++) { Particle &m = group->list[i]; m.age += dt; m.pos += m.vel * dt; } }
false
false
false
false
false
0
Save ( std::ostream& o ) const { o << "[" << Name.c_str () << "]\n"; for ( ConfBase::const_iterator i = Base.begin (); i != Base.end (); ++i ) (*i)->Save (o); o << std::endl; }
false
false
false
false
false
0
eb_load_all_appendix_subbooks(EB_Appendix *appendix) { EB_Error_Code error_code; EB_Subbook_Code current_subbook_code; EB_Appendix_Subbook *subbook; int i; eb_lock(&appendix->lock); LOG(("in: eb_load_all_appendix_subbooks(appendix=%d)", (int)appendix->code)); /* * The appendix must h...
false
false
false
false
false
0
c_backtrace(state_t *s) { int i; if (!_debugstate_valid) { sciprintf("Not in debug state\n"); return 1; } sciprintf("Call stack (current base: 0x%x):\n", s->execution_stack_base); for (i = 0; i <= s->execution_stack_pos; i++) { exec_stack_t *call = &(s->execution_stack[i]); const char *objname = obj_get_...
false
false
false
false
false
0
NsTclWhileObjCmd(arg, interp, objc, objv) ClientData arg; /* Pointer to NsInterp. */ Tcl_Interp *interp; /* Current interpreter. */ int objc; /* Number of arguments. */ Tcl_Obj *CONST objv[]; /* Argument objects. */ { NsInterp *itP...
false
false
false
false
false
0
NewComment(Node *from, Node *to, bool nested) { Comment *c = new Comment(CommentStr(from), CommentStr(to), nested); c->next = firstComment; firstComment = c; }
false
false
false
false
false
0
timespec_to_sample(const clockid_t which_clock, const struct timespec *tp) { unsigned long long ret; ret = 0; /* high half always zero when .cpu used */ if (CPUCLOCK_WHICH(which_clock) == CPUCLOCK_SCHED) { ret = (unsigned long long)tp->tv_sec * NSEC_PER_SEC + tp->tv_nsec; } else { ret = cputime_to_expires(tim...
false
false
false
false
false
0
isExtension(char *line) { Tokenizer t(line); if (t.GetNextToken() != "#ifndef") return false; Tokenizer nameTokens(t.GetNextToken(), "_"); std::string header = nameTokens.GetNextToken(); if ((header == "GL") || (header == "WGL") || (header == "GLX")) { return true; } return false; }
false
false
false
false
false
0
sheet_insert_rows (Sheet *sheet, int row, int count, GOUndo **pundo, GOCmdContext *cc) { GnmExprRelocateInfo reloc_info; GnmRange region; int i; ColRowStateList *states = NULL; int first = gnm_sheet_get_max_rows (sheet) - count; g_return_val_if_fail (IS_SHEET (sheet), TRUE); g_return_val_if_fail (count > 0...
false
false
false
false
false
0
php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char *path, const char *caption TSRMLS_DC) { char *tmp = estrdup(path); char *msg; int free_msg = 0; if (wrapper) { if (wrapper->err_count > 0) { int i; size_t l; int brlen; char *br; if (PG(html_errors)) { brlen = 7; br...
false
false
false
false
false
0
cpl_flux_get_noise_window(const cpl_image * diff, const cpl_size * zone_def, cpl_size ron_hsize, cpl_size ron_nsamp, double * no...
false
false
false
false
false
0
zstop(i_ctx_t *i_ctx_p) { os_ptr op = osp; uint count = count_to_stopped(i_ctx_p, 1L); if (count) { /* * If there are any t_oparrays on the e-stack, they will pop * any new items from the o-stack. Wait to push the 'true' * until we have run all the unwind procedures. ...
false
false
false
false
false
0
setgamma(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; int i, val; u8 gamma[17]; const u8 *gamma_base; static const u8 delta[17] = { 0x00, 0x14, 0x1c, 0x1c, 0x1c, 0x1c, 0x1b, 0x1a, 0x18, 0x13, 0x10, 0x0e, 0x08, 0x07, 0x04, 0x02, 0x00 }; switch (sd->sensor) { case SENSOR_ADCM1700: ...
false
false
false
false
false
0
reply_ptrfind(const int sock, const classcode_t classcode, const unsigned code, const netid_t nid, const ULONG flags) { LONG pind; const struct spptr *pp; char ptrname[PTRNAMESIZE+1]; pullin(sock, ptrname, sizeof(ptrname)); for (pind = Ptr_seg.dptr->ps_l_head; pind >= 0L; pind = Ptr_seg.plist[pind].l_nxt) ...
true
true
false
false
false
1
getxattr ( pfs_name *name, const char *attrname, void *data, size_t size ) { ssize_t result; if(!pfs_acl_check(name,IBOX_ACL_READ)) return -1; debug(D_LOCAL,"getxattr %s %s",name->rest,attrname); #ifdef CCTOOLS_OPSYS_DARWIN result = ::getxattr(name->rest, attrname, data, size, 0, 0); #else result = ::getxatt...
false
false
false
false
false
0
vtag_parse(void *data, size_t bytes, int *error) { struct vtag *s; int error_; if (!error) error = &error_; if (!(s = vtag_create(error))) return NULL; *error = parse(s, data, bytes); if (*error != VE_OK) { vtag_cleanup(s); return NULL; ...
false
false
false
false
false
0
get_topo_conf(void) { int i; switch_record_bitmaps_t sw_nodes_bitmaps; switch_record_bitmaps_t *sw_nodes_bitmaps_ptr; if (TOPO_DEBUG) g_print("get_topo_conf\n"); if (!g_topo_info_msg_ptr && slurm_load_topo(&g_topo_info_msg_ptr)) { slurm_perror ("slurm_load_topo error"); if (TOPO_DEBUG) g_print("get_topo...
false
false
false
false
false
0
findroman(c, ptr, minp, maxp) int c, ptr, *minp, *maxp; { int n, min, max; min = *minp; max = *maxp; for (;;) { n = (min + max) / 2; if (n <= min || n >= max) return(-1); if (ptr >= romanlist[n].len) min = n; else if (c > romanlist[n].str[ptr]) min = n; else if (c < romanlist[n].str[ptr]) max = n; else...
false
false
false
false
false
0
kdtree_fits_write_chunk(kdtree_fits_t* io, fitsbin_chunk_t* chunk) { fitsbin_t* fb = kdtree_fits_get_fitsbin(io); if (fitsbin_write_chunk(fb, chunk)) { ERROR("Failed to write kdtree extra chunk"); return -1; } return 0; }
false
false
false
false
false
0
FcScandir (const char *dirp, struct dirent ***namelist, int (*filter) (const struct dirent *), int (*compar) (const struct dirent **, const struct dirent **)) { DIR *d; struct dirent *dent, *p, **dlist, **dlp; size_t lsize = 128, n = 0; d = opendir (dirp); if (!d) return -1; dlis...
false
true
false
false
false
1
iface_get_offload(pcap_t *handle) { int ret; #ifdef ETHTOOL_GTSO ret = iface_ethtool_ioctl(handle, ETHTOOL_GTSO, "ETHTOOL_GTSO"); if (ret == -1) return -1; if (ret) return 1; /* TCP segmentation offloading on */ #endif #ifdef ETHTOOL_GUFO ret = iface_ethtool_ioctl(handle, ETHTOOL_GUFO, "ETHTOOL_GUFO"); if (...
false
false
false
false
false
0
ssdv_out_jpeg_int(ssdv_t *s, uint8_t rle, int value) { uint16_t huffbits = 0; int intbits; uint8_t hufflen = 0, intlen; int r; jpeg_encode_int(value, &intbits, &intlen); r = jpeg_dht_lookup_symbol(s, (rle << 4) | (intlen & 0x0F), &huffbits, &hufflen); if(r != SSDV_OK) fprintf(stderr, "jpeg_dht_lookup_symbol:...
false
false
false
false
false
0
send_self_update(struct interface *ifp) { if(ifp == NULL) { struct interface *ifp_aux; FOR_ALL_INTERFACES(ifp_aux) { if(!if_up(ifp_aux)) continue; send_self_update(ifp_aux); } return; } debugf("Sending self update to %s.\n", ifp->name)...
false
false
false
false
false
0