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
import_goods(int importType, int importNationRecno, float importAmt) { if( importNationRecno == nation_recno ) return; NationRelation* nationRelation = get_relation(importNationRecno); nationRelation->cur_year_import[importType] += importAmt; nationRelation->cur_year_import[IMPORT_TOTAL] += importAmt; add_e...
false
false
false
false
false
0
select_chain_operator(int chainop_id) { // -------- DBC_REQUIRE(is_selected() == true); DBC_REQUIRE(selected_chains().size() == 1); DBC_REQUIRE(chainop_id > 0); // -------- unsigned int p = selected_chainsetup_repp->first_selected_chain(); if (p < selected_chainsetup_repp->chains.size()) { CHAIN *ch ...
false
false
false
false
false
0
tg3_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct tg3 *tp = netdev_priv(netdev); pci_ers_result_t err = PCI_ERS_RESULT_NEED_RESET; netdev_info(netdev, "PCI I/O error detected\n"); rtnl_lock(); /* We probably don't have ...
false
false
false
false
false
0
gwy_undo_container_remove_from_list(GList *list, const gchar *prefix) { guint i, j, len; const gchar *key; GList *l; len = strlen(prefix); for (l = list; l; l = g_list_next(l)) { GwyAppUndoLevel *level = (GwyAppUndoLevel*)l->data; for (i = j = 0...
false
false
false
false
false
0
nfs_fs_proc_net_init(struct net *net) { struct nfs_net *nn = net_generic(net, nfs_net_id); struct proc_dir_entry *p; nn->proc_nfsfs = proc_net_mkdir(net, "nfsfs", net->proc_net); if (!nn->proc_nfsfs) goto error_0; /* a file of servers with which we're dealing */ p = proc_create("servers", S_IFREG|S_IRUGO, ...
false
false
false
false
false
0
verify_iinc(struct verifier_block *bb) { int err; unsigned int idx; idx = read_index(bb); err = peek_vrf_lvar(bb, J_INT, idx); if (err) return err; return 0; }
false
false
false
false
false
0
static_origin (gamgi_object *child, gamgi_object *parent) { gamgi_text *text; gamgi_orbital *orbital; gamgi_atom *atom; gamgi_direction *direction; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; double origin[3]; ...
false
false
false
false
false
0
ilStrLen(ILconst_string Str) { ILconst_string eos = Str; if (Str == NULL) return 0; while (*eos++); return((int)(eos - Str - 1)); }
false
false
false
false
false
0
optimize_reg_copy_2 (rtx insn, rtx dest, rtx src) { rtx p, q; rtx set; int sregno = REGNO (src); int dregno = REGNO (dest); basic_block bb = BLOCK_FOR_INSN (insn); for (p = NEXT_INSN (insn); p; p = NEXT_INSN (p)) { if (! INSN_P (p)) continue; if (BLOCK_FOR_INSN (p) != bb) break; se...
false
false
false
false
false
0
goto_mouse ( int mx, int my, // Pixel coords. in draw area. bool delay_send // Delay send_location for a bit. ) { GdkRectangle oldbox = viewbox; // Old location of box. int oldtx = tx, oldty = ty; // Set tx,ty here so hscrolled() & // vscrolled() don't send to Exult. tx = (mx*c_num_tiles)/draw->...
false
false
false
false
false
0
nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct nfs_unlinkdata *data) { struct rpc_message msg = { .rpc_argp = &data->args, .rpc_resp = &data->res, .rpc_cred = data->cred, }; struct rpc_task_setup task_setup_data = { .rpc_message = &msg, .callback_ops = &nfs_unlink_ops, .callback_data...
false
false
false
false
false
0
_rtl92s_phy_config_rfpa_bias_current(struct ieee80211_hw *hw, enum radio_path rfpath) { struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); bool rtstatus = true; u32 tmpval = 0; /* If inferiority IC, we have to increase the PA bias current */ if (rtlhal->ic_class != IC_INFERIORITY_A) { tmpval = rtl92s_phy_qu...
false
false
false
false
false
0
flickr_photo_load_from_element (DomDomizable *base, DomElement *element) { FlickrPhoto *self; if ((element == NULL) || (g_strcmp0 (element->tag_name, "photo") != 0)) return; self = FLICKR_PHOTO (base); flickr_photo_set_id (self, dom_element_get_attribute (element, "id")); flickr_photo_set_secret (self, ...
false
false
false
false
false
0
GB_CollectionSet(GB_COLLECTION col, const char *key, int len, GB_VARIANT *value) { VARIANT *data; if (VARIANT_is_null((VARIANT *)&value->value)) remove_key((CCOLLECTION *)col, key, len); else { data = (VARIANT *)add_key((CCOLLECTION *)col, key, len); if (!data) return TRUE; GB_StoreVariant(value, data);...
false
false
false
false
false
0
detect_cookie_chrome( std::string profile_root, std::string& project_url, std::string& name, std::string& value ) { bool retval = false; std::string tmp; std::string hostname; char query[1024]; sqlite3* db; char* lpszSQLErrorMessage = NULL; int rc; CHRO...
false
false
false
false
false
0
DivideCompositePixels(void *mutable_data, /* User provided mutable data */ const void *immutable_data, /* User provided immutable data */ const Image *source_image, /* Source image */ const PixelPacket *source_pixels, /* Pi...
false
false
false
false
false
0
utest_badfile(char *filename, int testnumber, int expected_alphatype, int expected_status, int expected_linenumber, char *expected_errmsg) { ESL_ALPHABET *abc = esl_alphabet_Create(expected_alphatype); ESLX_MSAFILE *afp = NULL; ESL_MSA *msa = NULL; int status; if ( (status = eslx_msafile_Ope...
false
false
false
false
false
0
InitPresence() { presence_push_ = new buzz::PresencePushTask(xmpp_client_, this); presence_push_->SignalStatusUpdate.connect( this, &CallClient::OnStatusUpdate); presence_push_->SignalMucJoined.connect(this, &CallClient::OnMucJoined); presence_push_->SignalMucLeft.connect(this, &CallClient::OnMucLeft); pr...
false
false
false
false
false
0
i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj) { struct sg_page_iter sg_iter; BUG_ON(obj->userptr.work != NULL); __i915_gem_userptr_set_active(obj, false); if (obj->madv != I915_MADV_WILLNEED) obj->dirty = 0; i915_gem_gtt_finish_object(obj); for_each_sg_page(obj->pages->sgl, &sg_iter, obj->page...
false
false
false
false
false
0
handleFinished(int code, QProcess::ExitStatus status) { Process::handleFinished(code, status); // Hand over data to the other side of the connection. if (!locList_.isEmpty()) conn_->onDataReady(locList_); // Signal normal termination. conn_->onFinished(); // Detach from the connection object. conn_->setCtrl...
false
false
false
false
false
0
mboxlist_findstage(const char *name, char *stagedir, size_t sd_len) { const char *root; struct mboxlist_entry mbentry; int r; assert(stagedir != NULL); /* Find mailbox */ r = mboxlist_lookup(name, &mbentry, NULL); if (r) return r; root = config_partitiondir(mbentry.partition); if...
false
false
false
false
false
0
cgi_cookie(const char *p) { size_t pl=strlen(p); const char *c=getenv("HTTP_COOKIE"); char *buf; while (c && *c) { size_t i; for (i=0; c[i] && c[i] != '='; i++) ; if (i == pl && strncmp(p, c, i) == 0) { c += i; if (*c) ++c; /* skip over = */ for (i=0; c[i] && c[i] != ';'; i++) ; buf=mallo...
false
false
false
false
false
0
da_new (const char * name, size_t size, enum da_growth growth, size_t increment, da_print_func_t self_print, da_cmp_func_t cmp) { struct darray * res; /* No longer relevant: size_t cannot be null */ if (size == 0) error (da_exit_error, 0, "invalid size for dynamic array `%s': %d", name, size); if (i...
false
false
false
false
false
0
Skill_level_names(int level, int translate) { char *str = NULL; #if NUM_SKILL_LEVELS != 5 #error Number of skill levels is wrong! #endif if(translate){ switch( level ) { case 0: str = XSTR("Very Easy", 469); break; case 1: str = XSTR("Easy", 470); break; case 2: str = XSTR("Medium", 471); ...
false
false
false
false
false
0
ios_init() { int err; drv_manager_init(); drv_set_verbose( stdout ); err = ios_data_init(); if( err == IOS_ERROR ) return IOS_ERROR; return IOS_OK; }
false
false
false
false
false
0
copacin_readf( FILE *fp, char *buf, int bufsize, int *bufpos, newstr *line, newstr *reference, int *fcharset ) { int haveref = 0, inref=0; char *p; *fcharset = CHARSET_UNKNOWN; while ( !haveref && readmore( fp, buf, bufsize, bufpos, line ) ) { /* blank line separates */ if ( line->data==NULL ) continue; if ( ...
false
false
false
false
false
0
ipmi_sel_parse_read_sensor_type (ipmi_sel_parse_ctx_t ctx, uint8_t *sensor_type) { struct ipmi_sel_system_event_record_data system_event_record_data; if (!ctx || ctx->magic != IPMI_SEL_PARSE_CTX_MAGIC) { ERR_TRACE (ipmi_sel_parse_ctx_errormsg (ctx), ipmi_sel_parse_ctx_errnum (ctx)); return (-1); ...
false
false
false
false
false
0
fsp_stop_import_all (fsp_link *link) { const int threshold = 32; int sent[link->segments], working[link->servers]; for (fs_segment segment = 0; segment < link->segments; ++segment) { sent[segment] = 0; } for (int server = 0; server < link->servers; ++server) { working[server] = 0; } int errors ...
false
false
false
false
true
1
gin_desc(StringInfo buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; switch (info) { case XLOG_GIN_CREATE_INDEX: appendStringInfo(buf, "Create index, "); desc_node(buf, *(RelFileNode *) rec, GIN_ROOT_BLKNO); break; case XLOG_GIN_CREATE_PTREE: appendStringInfo(buf, "Create pos...
false
false
false
false
false
0
get_canonic_origin(const char* o, char *co, int sz) { int ret = -1; if(o && o[0] && co) { co[0]=0; struct evhttp_uri *uri = evhttp_uri_parse(o); if(uri) { const char *scheme = evhttp_uri_get_scheme(uri); if(scheme && scheme[0]) { size_t schlen = strlen(scheme); if((schlen<(size_t)sz) && (schlen<S...
true
true
false
false
false
1
drawSeparator( const QRect& rect, QPainter* painter, QWidget* widget ) { #if ( QT_VERSION >= 0x040500 ) QStyleOptionFrameV3 option; option.init( widget ); option.frameShape = QFrame::VLine; option.state |= QStyle::State_Sunken; option.rect = rect; option.lineWidth = 1; widget->style()->drawC...
false
false
false
false
false
0
l1oip_bctrl(struct mISDNchannel *ch, u_int cmd, void *arg) { struct bchannel *bch = container_of(ch, struct bchannel, ch); int err = -EINVAL; if (bch->debug & DEBUG_HW) printk(KERN_DEBUG "%s: cmd:%x %p\n", __func__, cmd, arg); switch (cmd) { case CLOSE_CHANNEL: test_and_clear_bit(FLG_OPEN, &bch->Fla...
false
false
false
false
false
0
free_qpn_table(struct hfi1_qpn_table *qpt) { int i; for (i = 0; i < ARRAY_SIZE(qpt->map); i++) free_page((unsigned long) qpt->map[i].page); }
false
false
false
false
false
0
visit_enter(ir_call *ir) { if (can_inline(ir)) { ir->generate_inline(ir); ir->remove(); this->progress = true; } return visit_continue; }
false
false
false
false
false
0
conn_plain_read_cb(rb_fde_t *fd, void *data) { conn_t *conn = data; int length = 0; if(conn == NULL) return; if(IsDead(conn)) return; if(plain_check_cork(conn)) return; while(1) { if(IsDead(conn)) return; length = rb_read(conn->plain_fd, inbuf, sizeof(inbuf)); if(length == 0 || (length < 0 &&...
false
false
false
false
false
0
putgenericR(befig_list* befig, char* name, float Rup_value, float Rdown_value) { char* R_up, *R_down; char memo; char *output; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; else { fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); ...
false
false
false
false
false
0
fetch_pwd(pam_handle_t *pamh) { long rc; const char *username = NULL; struct passwd *pwd = NULL; rc = pam_get_user(pamh, &username, NULL); if (rc != PAM_SUCCESS || username == NULL) { syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user [%s]; rc = [%ld]\n", username, rc); return NULL; } pwd = g...
false
false
false
false
false
0
queryNS(const QDomElement &e) { return e.firstChildElement("query").attribute("xmlns"); }
false
false
false
false
false
0
UnsupportedChunk_Ascii(LineSplitter& splitter, const ChunkInfo& nfo, const char* name) { const std::string error = format("Encountered unsupported chunk: ") << name << " [version: "<<nfo.version<<", size: "<<nfo.size<<"]"; // we can recover if the chunk size was specified. if(nfo.size != static_cast<unsigned int...
false
false
false
false
false
0
compute_domains( __isl_keep isl_union_map *executed, __isl_keep isl_ast_build *build) { struct isl_codegen_domains domains; isl_ctx *ctx; isl_set *domain; isl_union_set *schedule_domain; isl_set *classes; isl_space *space; int n_param; enum isl_ast_build_domain_type type; int empty; if (!executed) return ...
false
false
false
false
false
0
set_switch_stmt_execution_predicate (struct ipa_node_params *info, struct inline_summary *summary, basic_block bb) { gimple last; tree op; int index; struct agg_position_info aggpos; edge e; edge_iterator ei; size_t n; size_t case_idx; last = last_stmt (bb); if (!last || gimple_co...
false
false
false
false
false
0
theme_enumerate(int (*enumerator)(const char *theme, const char *value)) { int i; if (!enumerator) return; if (no_prompt_cache) { if (!enumerator("no_prompt_cache", "")) return; } for (i = 0; i < 0x100; i++) { struct format *ff; for (ff = formats[i]; ff; ff = ff->next) { if (!enumerator(ff->name...
false
false
false
false
false
0
p8_add_key(SSL_CTX *ssl_ctx, uint8_t *priv_key) { uint8_t *buf = priv_key; int len, offset = 0; int ret = SSL_NOT_OK; /* Skip the preamble and go straight to the private key. We only support rsaEncryption (1.2.840.113549.1.1.1) */ if (asn1_next_obj(buf, &offset, ASN1_SEQUENCE) < 0 || ...
false
false
false
false
false
0
HarmonicTracking(const SpectralPeakArray& in,SpectralPeakArray& out,TData funFreq) { TData d; TIndex pos; out.SetnPeaks(mnMaxSines); //DataArray& iFreqBuffer=in.GetFreqBuffer(); DataArray& oFreqBuffer=out.GetFreqBuffer(); DataArray& iMagBuffer=in.GetMagBuffer(); DataArray& oMagBuffer=out.GetMagBuffer(); Dat...
false
false
false
false
false
0
scm_m_do (SCM expr, SCM env SCM_UNUSED) { SCM variables = SCM_EOL; SCM init_forms = SCM_EOL; SCM step_forms = SCM_EOL; SCM binding_idx; SCM cddr_expr; SCM exit_clause; SCM commands; SCM tail; const SCM cdr_expr = SCM_CDR (expr); ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr); ...
false
false
false
false
false
0
vidioc_enum_fmt_vid_cap(struct file *file, void *priv, struct v4l2_fmtdesc *fmt) { char *desc = NULL; switch (fmt->index) { case 0: fmt->pixelformat = V4L2_PIX_FMT_MJPEG; desc = "Motion JPEG"; break; case 1: fmt->pixelformat = V4L2_PIX_FMT_MPEG1; desc = "MPEG-1 ES"; break; case 2: fmt->pixelfo...
false
true
false
false
false
1
setCurrentLevelSet(const QString& levelSetName) { m_gameCurrentLevelSetName = levelSetName; int count = m_ui.m_lwLevelSets->count(); for (int i=0;i<count;++i) { QListWidgetItem* item = m_ui.m_lwLevelSets->item(i); if (!item) continue; if (item->data(KAtomic::LevelSe...
false
false
false
false
false
0
on_name_lost (GDBusConnection *connection, const gchar *name, gpointer user_data) { _gcr_debug ("lost name: %s", name); /* Called like so when no connection can be made */ if (connection == NULL) { g_warning ("couldn't connect to session bus"); gtk_main_quit (); } else if (g_strcmp...
false
false
false
false
false
0
job_step_complete(uint32_t job_id, uint32_t step_id, uid_t uid, bool requeue, uint32_t job_return_code) { struct job_record *job_ptr; struct step_record *step_ptr; int error_code; job_ptr = find_job_record(job_id); if (job_ptr == NULL) { info("job_step_complete: invalid job id %u", job_id); return ESL...
false
false
false
false
false
0
__recent_add_utf8_filename (const gchar *utf8_filename) { GtkRecentData *recent_data; gchar *filename; gchar *uri; gchar *pwd; static gchar *groups[2] = { "gnomint", NULL }; recent_data = g_slice_new (GtkRecentDa...
false
false
false
false
false
0
exist_chooser(CHAR16 *name) { chooser_t **p; for (p=choosers_tab; *p; p++) { if (!StrCmp(name, (*p)->chooser_name)) return 0; } return -1; }
false
false
false
false
true
1
phase0_getc () { int c; c = getc (fp); if (c == EOF) { if (ferror (fp)) error (EXIT_FAILURE, errno, _("error while reading \"%s\""), real_file_name); return EOF; } if (c == '\r') { int c1 = getc (fp); if (c1 != EOF && c1 != '\n') ungetc (c1, ...
true
true
false
false
true
1
checkRedundantNextPrevious() { for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) { if (Token::Match(tok, ". previous ( ) . next|tokAt|strAt|linkAt (") || Token::Match(tok, ". next ( ) . previous|tokAt|strAt|linkAt (") || (Token::simpleMatch(tok, ". tokAt (") && Token::Match(t...
false
false
false
false
false
0
__wake_up_bit(wait_queue_head_t *wq, void *word, int bit) { struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word, bit); if (waitqueue_active(wq)) __wake_up(wq, TASK_NORMAL, 1, &key); }
false
false
false
false
false
0
__vpn_ipconfig_foreach(void (*function) (int index, void *user_data), void *user_data) { GList *list, *keys; keys = g_hash_table_get_keys(ipdevice_hash); if (keys == NULL) return; for (list = g_list_first(keys); list; list = g_list_next(list)) { int index = GPOINTER_TO_INT(list->data); function(index,...
false
false
false
false
false
0
x_strndup(const char *s, size_t size, const char *file, int line) { const char *p; size_t length; char *copy; /* Don't assume that the source string is nul-terminated. */ for (p = s; (size_t) (p - s) < size && *p != '\0'; p++) ; length = p - s; copy = malloc(length + 1); while (...
false
true
false
false
false
1
arith_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) { return ((GET_CODE (op) == CONST_INT) && ( #line 34 "/home/dcharvest/ubuntu64-builder/genericMake/build/toolchain/dl/gcc-4.7.4/gcc/config/xtensa/predicates.md" (xtensa_simm8 (INTVAL (op))))) || (register_operand (op, mode)); }
false
false
false
false
false
0
memmaps_timer (gpointer data) { MemMapsData * const mmdata = static_cast<MemMapsData*>(data); GtkTreeModel *model; model = gtk_tree_view_get_model (GTK_TREE_VIEW (mmdata->tree)); g_assert(model); update_memmaps_dialog (mmdata); return TRUE; }
false
false
false
false
false
0
toast_compress_datum(Datum value) { struct varlena *tmp; int32 valsize = VARSIZE_ANY_EXHDR(DatumGetPointer(value)); int32 len; Assert(!VARATT_IS_EXTERNAL(DatumGetPointer(value))); Assert(!VARATT_IS_COMPRESSED(DatumGetPointer(value))); /* * No point in wasting a palloc cycle if value size is out of the allow...
false
false
false
false
false
0
ReduceTree() { int i, j, bestknt; TreeNode last, next, best=NULL, node; for (i = 6; i >= 0; i--) { if (depthlist[i].next) { if (reduce_max) bestknt = 0; else bestknt = 99999999; last = depthlist + i; next =...
false
false
false
true
false
1
fi_gui_files_unselect_all(void) { GtkTreeView *tv = treeview_download_files; g_return_if_fail(tv); gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(tv)); }
false
false
false
false
false
0
hotkey_scroll_screen_down() { if (Hotkey_lines[Num_lines - 1].y + gr_get_font_height() > Hotkey_lines[Scroll_offset].y + Hotkey_list_coords[gr_screen.res][3]) { Scroll_offset++; while (!hotkey_line_query_visible(Selected_line) || (Hotkey_lines[Selected_line].type == HOTKEY_LINE_HEADING)) { Selected_line++; A...
false
false
false
false
false
0
dtoBigNum(const char *s) { this->resize(0); this->sign = 1; // Reset number to 0. Counter len = 0; // No chars converted yet vnl_bignum sum; while (*s == ' ' || *s == '\t' || *s == '\n' || *s == '\r') ++s; // skip whitespace if (*s == '-' || *s == '+') ++len; // Skip over leading ...
false
false
false
false
false
0
rrtype_getinfo(const char *name) { int t; for (t = 0; t < n_rr_types; t++) if (strcmpi(rr_types[t].name, name) == 0) return (rr_type *)&rr_types[t]; return NULL; }
false
false
false
false
false
0
pe_find_constraint_resource(GListPtr rsc_list, const char *id) { GListPtr rIter = NULL; for (rIter = rsc_list; id && rIter; rIter = rIter->next) { resource_t *parent = rIter->data; resource_t *match = parent->fns->find_rsc(parent, id, NULL, pe_find_renamed | pe_find_current); ...
false
false
false
false
false
0
section_entry_lookup(const struct section *psection, const char *path, ...) { char fullpath[MAX_LEN_SECPATH]; struct entry *pentry; va_list args; SECFILE_RETURN_VAL_IF_FAIL(NULL, psection, NULL != psection, NULL); va_start(args, path); fc_vsnprintf(fullpath, sizeof(fullp...
false
false
false
false
false
0
WorkerProc(int fd) { InitLogger(); HttpServer* server = new HttpServer(); server->SetListenSock(fd); server->RunServer(); delete server; }
false
false
false
false
false
0
start_timer(uint16_t n) { if(!TIMER_AVAILABLE()) return; if(timer_running) die("nested timers unsupported"); glk_request_timer_events(n * 100); timer_running = 1; }
false
false
false
false
false
0
eqstrn (dra, ddec) double dra; /* Right ascension in degrees */ double ddec; /* Declination in degrees */ { char *eqcoor; /* ASCII character string of position (returned) */ char decp; int rah,irm,decd,decm; double xpos,ypos,xp,yp,ras,decs; /* Right ascension to hours, minutes, and seconds */ xpos = dra /...
false
false
false
false
false
0
mdfour_tail(const unsigned char *in, size_t n) { unsigned char buf[128]; uint32_t M[16]; uint32_t b; m->totalN += n; b = m->totalN * 8; memset(buf, 0, 128); if (n) memcpy(buf, in, n); buf[n] = 0x80; if (n <= 55) { copy4(buf+56, b); copy64(M, buf); mdfour64(M); } else { copy4(buf+120, b); copy64(...
true
true
false
false
false
1
ds_color_table_changed_cb(AmitkDataSet * ds, AmitkViewMode view_mode, AmitkThreshold * threshold) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); threshold_update_color_table(threshold, view_mode); threshold_update_color_scales(threshold); return; }
false
false
false
false
false
0
e100_loopback_test(struct nic *nic, enum loopback loopback_mode) { int err; struct sk_buff *skb; /* Use driver resources to perform internal MAC or PHY * loopback test. A single packet is prepared and transmitted * in loopback mode, and the test passes if the received * packet compares byte-for-byte to the t...
false
false
false
false
false
0
enclose_text_action (guint key_id) { gint selection_end; gchar insert_chars [2] = {0, 0}; ScintillaObject *sci_obj; if (!enclose_enabled) return; sci_obj = document_get_current ()->editor->sci; if (sci_get_selected_text_length (sci_obj) < 2) return; key_id -= 4; selection_end = sci_get_selection_end (sc...
false
false
false
false
false
0
multiply(GLfloat *m, const GLfloat *n) { GLfloat tmp[16]; const GLfloat *row, *column; div_t d; int i, j; for (i = 0; i < 16; i++) { tmp[i] = 0; d = div(i, 4); row = n + d.quot * 4; column = m + d.rem; for (j = 0; j < 4; j++) tmp[i] += row[j] * colu...
false
true
false
false
false
1
tm_memopt_compute_antic (struct tm_region *region, vec<basic_block> blocks) { edge e; basic_block *worklist, *qin, *qout, *qend, bb; unsigned int qlen; int i; edge_iterator ei; /* Allocate a worklist array/queue. Entries are only added to the list if they were not already on the list. So the siz...
false
false
false
false
false
0
systray_icon_activate_cb(G_GNUC_UNUSED GtkStatusIcon *status_icon, GtkWindow *window) { if (gtk_window_is_active(window)) gtk_widget_hide(GTK_WIDGET(window)); else { gtk_window_deiconify(window); gtk_window_present(window); } }
false
false
false
false
false
0
rtl8xxxu_init_rf_regs(struct rtl8xxxu_priv *priv, struct rtl8xxxu_rfregval *array, enum rtl8xxxu_rfpath path) { int i, ret; u8 reg; u32 val; for (i = 0; ; i++) { reg = array[i].reg; val = array[i].val; if (reg == 0xff && val == 0xffffffff) break; switch (reg) { case 0xfe: msleep(50); ...
false
false
false
false
false
0
fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd) { switch (cmd) { case SPINOR_OP_READ_1_1_4: return SEQID_QUAD_READ; case SPINOR_OP_WREN: return SEQID_WREN; case SPINOR_OP_WRDI: return SEQID_WRDI; case SPINOR_OP_RDSR: return SEQID_RDSR; case SPINOR_OP_SE: return SEQID_SE; case SPINOR_OP_CHIP_ERASE: ret...
false
false
false
false
false
0
_get_used_limits_for_user( List user_limit_list, uint32_t user_id) { slurmdb_used_limits_t *used_limits = NULL; ListIterator itr = NULL; if (!user_limit_list) return NULL; itr = list_iterator_create(user_limit_list); while ((used_limits = list_next(itr))) { if (used_limits->uid == user_id) break; } lis...
false
false
false
false
false
0
bzfile_seek(struct bzfile *fil, struct bzcache *zc, avoff_t offset) { struct bzindex *zi; avoff_t curroff = bz_total_out(fil->s); avoff_t zcdist; avoff_t scdist; avoff_t dist; if(offset >= curroff) dist = offset - curroff; else dist = -1; zi = bzcache_find_index(zc, off...
false
false
false
false
false
0
set_cursor(int16_t line, int16_t column, int16_t window_number) { if (bool_equal(z_windows[window_number]->buffering, true)) wordwrap_flush_output(z_windows[window_number]->wordwrapper); if (column < 0) return; else if (line < 0) { if (ver < 6) return; else { if (line == -1) ...
false
false
false
false
false
0
_nrrdReadNrrdParse_measurement_frame(FILE *file, Nrrd *nrrd, NrrdIoState *nio, int useBiff) { static const char me[]="_nrrdReadNrrdParse_measurement_frame"; double colvec[NRRD_SPACE_DIM_MAX]; unsigned int dd, ii; char *info; AIR_UNUSED(file); info = nio->line + nio->pos...
false
false
false
false
false
0
SetLatency(jack_nframes_t nframes) { fLatency = nframes; /* setup the new latency values here, * so we dont need to change the backend codes. */ if (fFlags & JackPortIsOutput) { fCaptureLatency.min = nframes; fCaptureLatency.max = nframes; } if (fFlags & JackPortIsInput) { fPlaybackLatency.min = n...
false
false
false
false
false
0
load_plugins (NMDnsManager *self, const char **plugins) { NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (self); NMDnsPlugin *plugin; const char **iter; gboolean have_caching = FALSE; if (plugins && *plugins) { /* Create each configured plugin */ for (iter = plugins; iter && *iter; iter++) { if (!s...
false
false
false
false
false
0
LC226__CLOSURE__dwtrans(base0) register object *base0; { register object *base=vs_base; register object *sup=base+VM218; VC218 vs_check; {object V1631; object V1632; object V1633; V1631=(base[0]); V1632=(base[1]); V1633=(base[2]); vs_top=sup; if(!(immnum_gt((V1633),small_fixnum(0)))){ goto T5746;} if(((base...
false
false
false
false
false
0
ECPGstruct_member_dup(struct ECPGstruct_member * rm) { struct ECPGstruct_member *new = NULL; while (rm) { struct ECPGtype *type; switch (rm->type->type) { case ECPGt_struct: case ECPGt_union: type = ECPGmake_struct_type(rm->type->u.members, rm->type->type, rm->type->struct_sizeof); break; ca...
false
false
false
false
false
0
cmd_mail (siobuf_t conn, smtp_session_t session) { const char *mailbox; smtp_message_t message; char xtext[256]; /* Set a five minute timeout. This stays in force until the DATA command. */ sio_set_timeout (conn, session->envelope_timeout); message = session->current_message; mailbox = message->re...
false
false
false
false
false
0
jack_client_by_name (jack_engine_t *engine, const char *name) { jack_client_internal_t *client = NULL; JSList *node; jack_rdlock_graph (engine); for (node = engine->clients; node; node = jack_slist_next (node)) { if (strcmp ((const char *) ((jack_client_internal_t *) node->data)->control->name, ...
false
false
false
false
false
0
auparse_get_field_type(auparse_state_t *au) { if (au->le.e.sec) { rnode *r = aup_list_get_cur(&au->le); if (r) return nvlist_get_cur_type(r); } return AUPARSE_TYPE_UNCLASSIFIED; }
false
false
false
false
false
0
SCR_PlayCinematic (char *arg) { int width, height; byte *palette; char name[MAX_OSPATH], *dot; int old_khz; // make sure CD isn't playing music #ifdef CD_AUDIO CDAudio_Stop(); #endif palette = NULL; cl.cinematicframe = 0; dot = strstr (arg, "."); if (dot && !strcmp (dot, ".pcx")) { // static pcx image ...
true
true
false
false
false
1
ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context) { struct ib_uverbs_event_file *file = cq_context; struct ib_ucq_object *uobj; struct ib_uverbs_event *entry; unsigned long flags; if (!file) return; spin_lock_irqsave(&file->lock, flags); if (file->is_closed) { spin_unlock_irqres...
false
false
false
false
false
0
sg_remove_sfp_usercontext(struct work_struct *work) { struct sg_fd *sfp = container_of(work, struct sg_fd, ew.work); struct sg_device *sdp = sfp->parentdp; Sg_request *srp; /* Cleanup any responses which were never read(). */ while (!list_empty(&sfp->rq_list)) { srp = list_first_entry(&sfp->rq_list, Sg_request,...
false
false
false
false
false
0
optionsIOWrite(char *file) { int charactersPrinted; charactersPrinted=sprintf(_jpnevulatorOptions.io,"%.*s",(int)sizeof(_jpnevulatorOptions.io)-1,file); if(charactersPrinted!=strlen(file)) { fprintf(stderr,"%s: Filename truncated to %d chars\n",PROGRAM_NAME,charactersPrinted); } }
false
true
false
false
false
1
mh_summary_sync (CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changes, GCancellable *cancellable, GError **error) { CamelLocalSummaryClass *local_summary_class; gint i; GPtrArray *known_uids; CamelLocalMessageInfo *info; gchar ...
false
false
false
false
false
0
SetLastHTTPDownloadURL(uint8 t, const wxString& val) { wxConfigBase* cfg = wxConfigBase::Get(); wxString key = CFormat(wxT("/HTTPDownload/URL_%d")) % t; cfg->Write(key, val); }
false
false
false
false
false
0
MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) return false ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional in...
false
false
false
false
false
0
uf_file_set_absolute(const char *filename) { if (g_path_is_absolute(filename)) { return g_strdup(filename); } else { #ifdef HAVE_CANONICALIZE_FILE_NAME // canonicalize_file_name() requires the file to exist. // This is why we need to split 'filename' to dirname and basename. char...
false
false
false
false
false
0
nemo_file_management_properties_size_group_create (GtkBuilder *builder, char *prefix, int items) { GtkSizeGroup *size_group; int i; char *item_name; GtkWidget *widget; size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); for (i = 0; i < items; i++) { item_name = g_strdup_pri...
false
false
false
false
false
0
pilot_set_random_squad_pic(player *p) { // if there are no available pilot pics, set the image filename to null if (Num_pilot_squad_images <= 0) { player_set_squad_bitmap(p, "", true); player_set_squad_bitmap(p, "", false); } else { // pick a random name from the list int random_index = rand() % Num_pilot_s...
false
false
false
false
false
0
add_extension_action_for_files (NautilusView *view, NautilusMenuItem *item, GList *files) { char *name, *label, *tip, *icon; gboolean sensitive, priority; GtkAction *action; GdkPixbuf *pixbuf; ExtensionActionCallbackData *data; g_object_get (G_OBJECT (item), "name", &name, "label", &label, ...
false
false
false
false
false
0