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
str () { std::stringstream val; std::stringstream proto; val << name << "*" << rate << "*" << audio << "*"; protocols.sort (); for (std::list<std::string>::iterator iter = protocols.begin (); iter != protocols.end (); iter++) { if (iter != protocols.begin ()) proto << " "; proto...
false
false
false
false
false
0
eti_e_cell_event (ETableItem *item, ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags) { ECellActions actions = 0; gint ret_val; ret_val = e_cell_event ( ecel...
false
false
false
false
false
0
drr_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) { struct rtattr *tail; __u32 tmp; tail = NLMSG_TAIL(n); addattr_l(n, 1024, TCA_OPTIONS, NULL, 0); while (argc > 0) { if (strcmp(*argv, "quantum") == 0) { NEXT_ARG(); if (get_size(&tmp, *argv)) { fprintf(st...
false
false
false
false
false
0
gst_rtp_dv_depay_class_init (GstRTPDVDepayClass * klass) { GstElementClass *gstelement_class = (GstElementClass *) klass; GstBaseRTPDepayloadClass *gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_dv_depay_change_state); gs...
false
false
false
false
false
0
cherryview_irq_uninstall(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; if (!dev_priv) return; I915_WRITE(GEN8_MASTER_IRQ, 0); POSTING_READ(GEN8_MASTER_IRQ); gen8_gt_irq_reset(dev_priv); GEN5_IRQ_RESET(GEN8_PCU_); spin_lock_irq(&dev_priv->irq_lock); if (dev_priv->display_...
false
false
false
false
false
0
gdm_xdmcp_chooser_display_finalize (GObject *object) { GdmXdmcpChooserDisplay *chooser_display; g_return_if_fail (object != NULL); g_return_if_fail (GDM_IS_XDMCP_CHOOSER_DISPLAY (object)); chooser_display = GDM_XDMCP_CHOOSER_DISPLAY (object); g_return_if_fail (chooser_display-...
false
false
false
false
false
0
tsince_hr(struct frame *f) { struct timeval now; int n; do_gettimeofday(&now); n = now.tv_usec - f->sent.tv_usec; n += (now.tv_sec - f->sent.tv_sec) * USEC_PER_SEC; if (n < 0) n = -n; /* For relatively long periods, use jiffies to avoid * discrepancies caused by updates to the system time. * * On syst...
false
false
false
false
false
0
bytes_subscript(PyBytesObject* self, PyObject* item) { if (PyIndex_Check(item)) { Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError); if (i == -1 && PyErr_Occurred()) return NULL; if (i < 0) i += PyBytes_GET_SIZE(self); if (i < 0 || i >= PyBytes_GET_SIZ...
false
false
false
false
true
1
exo_icon_view_autoscroll (ExoIconView *icon_view) { gint px, py, x, y, width, height; gint hoffset, voffset; gfloat value; gdk_window_get_pointer (GTK_WIDGET (icon_view)->window, &px, &py, NULL); gdk_window_get_geometry (GTK_WIDGET (icon_view)->window, &x, &y, &width, &height, NULL); /* see if we are near...
false
false
false
false
false
0
t1_build(t1_state_t * t1, unsigned char *block, unsigned char dad, unsigned char pcb, ct_buf_t *bp, size_t *lenp) { unsigned int len; char more = FALSE; len = bp ? ct_buf_avail(bp) : 0; if (len > t1->ifsc) { pcb |= T1_MORE_BLOCKS; len = t1->ifsc; more = TRUE; } /* Add the sequence number */ switch (t1_...
false
false
false
false
false
0
pr_mouse_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) { PixbufRenderer *pr; GtkWidget *parent; pr = PIXBUF_RENDERER(widget); if (pr->scroller_id) return TRUE; switch (bevent->button) { case MOUSE_BUTTON_LEFT: pr->in_drag = TRUE; pr->drag_last_x = bevent->x; pr->drag_last_y = b...
false
false
false
false
false
0
PostInitStream(di_stream * s, int flags, int bufsize, int windowBits) #else PostInitStream(s, flags, bufsize, windowBits) di_stream *s ; int flags ; int bufsize ; int windowBits ; #endif { s->bufsize = bufsize ; s->compressedBytes = s->uncompressedBytes = s->last_error = 0 ; s->flags...
false
false
false
false
false
0
netreg_properties_reply(struct modem_data *modem, DBusMessageIter *dict) { DBG("%s", modem->path); while (dbus_message_iter_get_arg_type(dict) == DBUS_TYPE_DICT_ENTRY) { DBusMessageIter entry, value; const char *key; dbus_message_iter_recurse(dict, &entry); dbus_message_iter_get_basic(&entry, &key); ...
false
false
false
false
false
0
filestream_destructor(void *arg) { struct ast_filestream *f = arg; int status; int pid = -1; /* Stop a running stream if there is one */ filestream_close(f); /* destroy the translator on exit */ if (f->trans) ast_translator_free_path(f->trans); if (f->fmt->close) { void (*closefn)(struct ast_filestream *...
false
false
false
false
true
1
adfspart_check_CUMANA(struct parsed_partitions *state) { unsigned long first_sector = 0; unsigned int start_blk = 0; Sector sect; unsigned char *data; char *name = "CUMANA/ADFS"; int first = 1; int slot = 1; /* * Try Cumana style partitions - sector 6 contains ADFS boot block * with pointer to next 'drive'...
false
false
false
false
false
0
snd_mts64_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); if (card) snd_card_free(card); return 0; }
false
false
false
false
false
0
CMD_EwmhBaseStruts(F_CMD_ARGS) { int val[4]; if (GetIntegerArguments(action, NULL, val, 4) != 4 || val[0] < 0 || val[1] < 0 || val[2] < 0 || val[3] < 0) { fvwm_msg(ERR,"CMD_EwmhBaseStruts", "EwmhBaseStruts needs four positive arguments"); return; } if (ewmhc.BaseStrut.left != val[0] || ewmhc.Ba...
false
false
false
false
false
0
hfsplus_compose_lookup(u16 *p, u16 cc) { int i, s, e; s = 1; e = p[1]; if (!e || cc < p[s * 2] || cc > p[e * 2]) return NULL; do { i = (s + e) / 2; if (cc > p[i * 2]) s = i + 1; else if (cc < p[i * 2]) e = i - 1; else return hfsplus_compose_table + p[i * 2 + 1]; } while (s <= e); return NULL;...
false
false
false
false
false
0
bookmark_report ( const char* kind , folder* fl , const char* mark ) { int i ; for (i=0;i<fl->bm_n;i++) { bookmark* bm = fl->bms+i ; if (!strcmp(bm->mark->str, mark)) fprintf(stderr, "%s %s exists -> %s\n", kind, mark, bm->dest->str) ; } }
false
false
false
false
false
0
clish_shell_new(const clish_shell_hooks_t *hooks, void *cookie, FILE *istream) { clish_shell_t *this = malloc(sizeof(clish_shell_t)); if(this) { clish_shell_init(this,hooks,cookie,istream); if(hooks->init_fn) ...
false
false
false
false
false
0
nfsd_get_default_max_blksize(void) { struct sysinfo i; unsigned long long target; unsigned long ret; si_meminfo(&i); target = (i.totalram - i.totalhigh) << PAGE_SHIFT; /* * Aim for 1/4096 of memory per thread This gives 1MB on 4Gig * machines, but only uses 32K on 128M machines. Bottom out at * 8K on 32M ...
false
false
false
false
false
0
add_scope_stmt (begin_p, partial_p) int begin_p; int partial_p; { tree *stack_ptr = current_scope_stmt_stack (); tree ss; tree top = *stack_ptr; /* Build the statement. */ ss = build_stmt (SCOPE_STMT, NULL_TREE); SCOPE_BEGIN_P (ss) = begin_p; SCOPE_PARTIAL_P (ss) = partial_p; /* Keep the sc...
false
false
false
false
false
0
coverart_display_set_tracks_cb(GtkPodApp *app, gpointer tks, gpointer data) { GList *tracks = tks; if (!coverart_window_valid()) return; if (tracks) coverart_select_cover(tracks->data); redraw(FALSE); }
false
false
false
false
false
0
update_menu_items(void) { gboolean cur_file_exists; gboolean badd_file; GeanyDocument *doc; doc = document_get_current(); g_return_if_fail(doc != NULL && doc->file_name != NULL); cur_file_exists = doc && doc->file_name != NULL && g_path_is_absolute(doc->file_name); badd_file = (g_current_project ? TRUE : FALS...
false
false
false
false
false
0
same_succ_print (FILE *file, const same_succ e) { unsigned int i; bitmap_print (file, e->bbs, "bbs:", "\n"); bitmap_print (file, e->succs, "succs:", "\n"); bitmap_print (file, e->inverse, "inverse:", "\n"); fprintf (file, "flags:"); for (i = 0; i < VEC_length (int, e->succ_flags); ++i) fprintf (file, " ...
false
false
false
false
false
0
opal_hash_table_get_value_uint64(opal_hash_table_t* ht, uint64_t key, void **ptr) { opal_list_t* list = ht->ht_table + (key & ht->ht_mask); opal_uint64_hash_node_t *node; #if OPAL_ENABLE_DEBUG if(ht->ht_table_size == 0) { opal_output(0, "opal_hash_table_get_value_uint64:" "opal_hash_t...
false
false
false
false
false
0
BuildPolicy(OpProgress * /*Progress*/) { if (Policy != NULL) return true; Policy = new pkgPolicy(Cache); if (_error->PendingError() == true) return false; if (ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false) return false; return true; }
false
false
false
false
false
0
setPreviewImage(const QImage & preview) { m_image = preview.scaled(300, 300, Qt::KeepAspectRatio, Qt::SmoothTransformation); setFixedSize(m_image.size()); update(); }
false
false
false
false
false
0
mtree_atol8(char **p) { int64_t l, limit, last_digit_limit; int digit, base; base = 8; limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; l = 0; digit = **p - '0'; while (digit >= 0 && digit < base) { if (l>limit || (l == limit && digit > last_digit_limit)) { l = INT64_MAX; /* Truncate on ove...
false
false
false
false
false
0
find_item(game *g) { fetching_item = false; int best_value = minimum_item_value(); int range = sight_range(g->light_level()); if (range > 12) range = 12; int minx = posx - range, maxx = posx + range, miny = posy - range, maxy = posy + range; int index = -1, linet; if (minx < 0) minx = 0; if (miny < 0) ...
false
false
false
false
false
0
sn_ConsoleOut(const tOutput& o,int client){ // transform message to string tString message( o ); sn_ConsoleOutString( message, client ); }
false
false
false
false
false
0
adv7511_get_modes(struct drm_encoder *encoder, struct drm_connector *connector) { struct adv7511 *adv7511 = encoder_to_adv7511(encoder); struct edid *edid; unsigned int count; /* Reading the EDID only works if the device is powered */ if (!adv7511->powered) { regmap_update_bits(adv7511->regmap, ADV7511_...
false
false
false
false
false
0
rtl88e_phy_set_bw_mode(struct ieee80211_hw *hw, enum nl80211_channel_type ch_type) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &rtlpriv->phy; struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); u8 tmp_bw = rtlphy->current_chan_bw; if (rtlphy->set_bwmode_inprogress) return; rtlphy->se...
false
false
false
false
false
0
fwriteBulk(FILE *fp, robj *obj) { char buf[128]; obj = getDecodedObject(obj); snprintf(buf,sizeof(buf),"$%ld\r\n",(long)sdslen(obj->ptr)); if (fwrite(buf,strlen(buf),1,fp) == 0) goto err; if (sdslen(obj->ptr) && fwrite(obj->ptr,sdslen(obj->ptr),1,fp) == 0) goto err; if (fwrite("\r\n",2,1...
true
true
false
false
false
1
us_net_create_tcp_socket( const struct addrinfo *ai, bool do_bind ) { int r = -1; int s = -1; if ( ai ) { s = socket( ai->ai_family, ai->ai_socktype, ai->ai_protocol ); if ( s >= 0 ) { r = s; if ( do_bind ) { if ( bind( s, ai->a...
false
false
false
false
false
0
extract_saml11_nodeval(Icx_ctx *ctx, const xmlChar *path, xmlDocPtr token_doc) { xmlXPathContextPtr xpath_ctx; xmlXPathObjectPtr result; xmlNodeSetPtr nodeset; xmlNodePtr node; xmlChar *content; xpath_ctx = xmlXPathNewContext(token_doc); xmlXPathRegisterNs(xpath_ctx, PRE_SAML, NS_SAML_11); xmlXPathRegi...
false
false
false
false
false
0
instantiateNode(scene::ISceneNode* parent, scene::ISceneNode** outNode, CScenePrefab* p, const core::stringc& url) { #ifdef COLLADA_READER_DEBUG os::Printer::log("COLLADA instantiate node"); #endif for (u32 i=0; i<Prefabs.size(); ++i) { if (url == "" || url == Prefabs[i]->getId()) { if (p) ...
false
false
false
false
false
0
usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub, int port1, bool set) { int ret; if (set) ret = set_port_feature(hdev, port1, USB_PORT_FEAT_POWER); else ret = usb_clear_port_feature(hdev, port1, USB_PORT_FEAT_POWER); if (ret) return ret; if (set) set_bit(port1, hub->power_bits)...
false
false
false
false
false
0
take(const QDomElement &x) { if(!iqVerify(x, d->jid, id())) return false; if(x.attribute("type") == "result") { QDomElement q = queryTag(x); DiscoItem item; item.setJid( d->jid ); item.setNode( q.attribute("node") ); QStringList features; DiscoItem::Identities identities; for(QDomNode n = q.first...
false
false
false
false
false
0
json_serializable_real_deserialize (JsonSerializable *serializable, const gchar *name, GValue *value, GParamSpec *pspec, JsonNode *node) { JSON_N...
false
false
false
false
false
0
check_authn(request_rec * r, const char *sent_user, const char *sent_pw) { authn_status auth_result; authn_provider_list *current_provider; auth_form_config_rec *conf = ap_get_module_config(r->per_dir_config, &auth_form_module); current_provider = c...
false
false
false
false
false
0
consumeDecl() { int depth = 1; while(depth > 0) { int ch = cl_scope_lex(); if(ch ==0) { break; } if(ch == '}') { depth--; if(depth == 0) currentScope.pop_back();//reduce the scope continue; } else if(ch == '{') { depth ++ ; continue; } } }
false
false
false
false
false
0
join_read_const(JOIN_TAB *tab) { int error; TABLE *table= tab->table; if (table->status & STATUS_GARBAGE) // If first read { table->status= 0; if (cp_buffer_from_ref(tab->join->thd, table, &tab->ref)) error=HA_ERR_KEY_NOT_FOUND; else { error=table->file->index_read_idx_map(table->re...
false
false
false
false
false
0
ED4_selected_SAI_changed_cb(AW_root */*aw_root*/) { ED4_update_global_cursor_awars_allowed = false; if (!ignore_selected_SAI_changes_cb) { char *name = GBT_read_string(GLOBAL_gb_main,AWAR_SAI_NAME); if (name && name[0]) { #if defined(DEBUG) printf("Selected SAI is '%s'\n", name); #...
false
false
false
false
false
0
vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn, unsigned int *hv_status, unsigned int *target) { unsigned long status, dummy = 0; u32 pfn32; pfn32 = (u32)pfn; if (pfn32 != pfn) return -1; STATS_INC(b->stats.lock[false]); *hv_status = status = VMWARE_BALLOON_CMD(LOCK, pfn, dummy, *target)...
false
false
false
false
false
0
EndModal(int retCode) { if (retCode == wxID_OK) m_pPanel->OnApply(); else m_pPanel->OnCancel(); wxScrollingDialog::EndModal(retCode); }
false
false
false
false
false
0
elo_setup_10(struct elo *elo) { static const char *elo_types[] = { "Accu", "Dura", "Intelli", "Carroll" }; struct input_dev *dev = elo->dev; unsigned char packet[ELO10_PACKET_LEN] = { ELO10_ID_CMD }; if (elo_command_10(elo, packet)) return -1; dev->id.version = (packet[5] << 8) | packet[4]; input_set_abs_par...
false
false
false
false
false
0
HtmlDrawText(pCanvas, zText, nText, x, y, w, size_only, pNode, iIndex) HtmlCanvas *pCanvas; const char *zText; int nText; int x; int y; int w; int size_only; HtmlNode *pNode; int iIndex; { HtmlFont *pFont = fontFromNode(pNode); if (!size_only) { HtmlCanvasItem *pIte...
false
false
false
false
false
0
TB_balance(void) { node_t *n; edge_t *e; int i, low, high, choice, *nrank; int inweight, outweight; scan_and_normalize(); /* find nodes that are not tight and move to less populated ranks */ nrank = N_NEW(Maxrank + 1, int); for (i = 0; i <= Maxrank; i++) nrank[i] = 0; for (n = agf...
false
false
false
false
false
0
cipher_info_from_string( const char *cipher_name ) { const cipher_definition_t *def; if( NULL == cipher_name ) return NULL; for( def = cipher_definitions; def->info != NULL; def++ ) if( ! strcasecmp( def->info->name, cipher_name ) ) return( def->info ); return NULL; }
false
false
false
false
false
0
checkPlatformAssumptions() { int32* i = new int32(22); uint64 p = (uint64)(uintp)i; bool convOk = ((int32*)(uintp)p) == i; bool alignmentOk = (p & 3) == 0; delete i; if ( !alignmentOk ) { throw PlatformError("Unsupported Pointer-Alignment!"); } if ( !convOk ) { throw PlatformError("Can't convert between Poi...
false
false
false
false
false
0
taggedMessage(mail::imap &imapAccount, string name, string message, bool okfail, string errmsg) { if (name != "SEARCH") return false; if (okfail) callback.success(found); else callback.fail(errmsg); imapAccount.uninstallHandler(this); return true; }
false
false
false
false
false
0
asn1f_fix_dereference_values(arg_t *arg) { asn1p_expr_t *expr = arg->expr; int r_value = 0; if(expr->value && expr->meta_type == AMT_VALUE) { if(asn1f_value_resolve(arg, expr, 0)) { /* This function will emit messages */ r_value = -1; } } return r_value; }
false
false
false
false
false
0
whc_dbg_clean_up(struct whc *whc) { if (whc->dbg) { debugfs_remove(whc->dbg->pzl_f); debugfs_remove(whc->dbg->asl_f); debugfs_remove(whc->dbg->di_f); kfree(whc->dbg); } }
false
false
false
false
false
0
o_text_edit_end(GSCHEM_TOPLEVEL *w_current, char *string, int len, int text_size, int text_alignment) { TOPLEVEL *toplevel = w_current->toplevel; OBJECT *object; GList *s_current; int numselect; /* skip over head */ s_current = geda_list_get_glist( toplevel->page_current->selection_list ); numsele...
false
false
false
false
false
0
findfirst(const char* _pathname, struct ffblk *_ffblk, int /*_attrib*/) { _ffblk->filePath=_pathname; if(!(_ffblk->dir=opendir(_ffblk->filePath))) return true; return findnext(_ffblk); }
false
false
false
false
false
0
snd_vt1724_amp_init(struct snd_ice1712 *ice) { static const unsigned short wm_inits[] = { WM_ATTEN_L, 0x0000, /* 0 db */ WM_ATTEN_R, 0x0000, /* 0 db */ WM_DAC_CTRL, 0x0008, /* 24bit I2S */ WM_INT_CTRL, 0x0001, /* 24bit I2S */ }; unsigned int i; /* only use basic functionality for now */ /* VT1616 6ch c...
false
false
false
false
false
0
GeneratePluginOutput( const vector<const FileDescriptor*>& parsed_files, const string& plugin_name, const string& parameter, OutputDirectory* output_directory, string* error) { CodeGeneratorRequest request; CodeGeneratorResponse response; // Build the request. if (!parameter.empty()) { ...
false
false
false
false
false
0
v_turn(word prep, parse_rec *nounrec) { int newstate; /* 1=on, 0=off */ int dobj; dobj=p_obj(nounrec); newstate=(prep==ext_code[won]); /* ON or OFF ? */ if (!it_turnable(dobj) && !nounattr(dobj,light)) { sysmsgd(newstate?209:210, "$You$ can't turn $the_n$$noun$ $prep$.",nounrec); return; } ...
false
false
false
false
false
0
FindDefaultTeam( ) { // only the server should do this, the client does not have the full information on how to do do it right. if ( sn_GetNetState() == nCLIENT || !se_assignTeamAutomatically || spectating_ || !TeamChangeAllowed() ) return; static bool recursion = false; if ( recursion ) { ...
false
false
false
false
false
0
writeToStreamRender(mrpt::utils::CStream &out) const { // MRPT 0.9.5 svn 2774 (Dec 14th 2011): // Added support of versioning at this level of serialization too. // Should have been done from the beginning, terrible mistake on my part. // Now, the only solution is something as ugly as this: // // For reference: I...
false
false
false
false
false
0
get_qamrs_err_count(struct i2c_device_addr *dev_addr, struct drxjrs_errors *rs_errors) { int rc; u16 nr_bit_errors = 0, nr_symbol_errors = 0, nr_packet_errors = 0, nr_failures = 0, nr_snc_par_fail_count = 0; /* check arguments */ if (dev_addr == NULL) return -EINVAL; /* all reported errors are ...
false
false
false
false
false
0
cpufreq_put_policy(struct cpufreq_policy *policy) { if ((!policy) || (!policy->governor)) return; free(policy->governor); policy->governor = NULL; free(policy); }
false
false
false
false
false
0
convertObject(FWObject *obj) { MultiAddress *adt = MultiAddress::cast(obj); if (adt!=NULL && adt->isCompileTime()) { adt->loadFromSource(ipv6, getCachedFwOpt(), inTestMode()); } }
false
false
false
false
false
0
regcomp(regex_t *preg, const char *regex, int cflags) { return regncomp(preg, regex, regex ? strlen(regex) : 0, cflags); }
false
false
false
false
false
0
dbzfetch(key) datum key; { char buffer[DBZMAXKEY + 1]; datum mappedkey; register size_t keysize; DEBUG(("dbzfetch: (%s)\n", key.dptr)); /* Key is supposed to be less than DBZMAXKEY */ keysize = key.dsize; if (keysize >= DBZMAXKEY) { keysize = DBZMAXKEY; DEBUG(("keysize is %d - truncated to %d\n", key.dsize...
false
false
false
false
false
0
read_NamedColorVal2( icmNamedColorVal *p, char *bp, char *end, icColorSpaceSignature pcs, /* Header Profile Connection Space */ unsigned int ndc /* Number of device coords */ ) { int rv; icc *icp = p->icp; unsigned int i; if (bp > end || (32 + 6) > (end - bp) || ndc > (end - bp - 32 - 6)/2) { sprint...
false
true
false
false
false
1
libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp) { int rc; if(!sftp) return LIBSSH2_ERROR_BAD_USE; BLOCK_ADJUST(rc, sftp->channel->session, sftp_shutdown(sftp)); return rc; }
true
true
false
false
false
1
ReleaseResultSet( OGRLayer * poLayer ) { if( poLayer != NULL && poLayer == poResultSetLayer ) { poResultSetLayer = NULL; bIsFeatureCountEnabled = FALSE; /* Restore backup'ed optimization parameters */ for(int i=0; i < nLayers; i++) { papoLayers[i]->SetDecla...
false
false
false
false
false
0
bluetooth_chooser_combo_dispose (GObject *object) { BluetoothChooserCombo *combo = BLUETOOTH_CHOOSER_COMBO (object); if (combo->priv->model_notify_id != 0) { GtkWidget *treeview; treeview = bluetooth_chooser_get_treeview (BLUETOOTH_CHOOSER (combo->priv->chooser)); g_signal_handler_disconnect (treeview, combo-...
false
false
false
false
false
0
Scm_VMPushCC(ScmCContinuationProc *after, void **data, int datasize) { int i; ScmContFrame *cc; ScmObj *s; ScmVM *vm = theVM; CHECK_STACK(CONT_FRAME_SIZE+datasize); s = SP; for (i=0; i<datasize; i++) { *s++ = SCM_OBJ(data[i]); } cc = (ScmContFrame*)s; s...
false
false
false
false
false
0
window_selection_start(Win *win) { if (win->sel.start != EPOS && win->sel.end != EPOS) return; size_t pos = window_cursor_get(win); win->sel.start = win->sel.end = pos; window_draw(win); window_cursor_to(win, pos); }
false
false
false
false
false
0
brasero_jacket_view_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural) { BraseroJacketViewPrivate *priv; GtkWidget *toplevel; gdouble resolution; gint width; priv = BRASERO_JACKET_VIEW_PRIVATE (wi...
false
false
false
false
false
0
ql_get_mpi_shadow_regs(struct ql_adapter *qdev, u32 *buf) { u32 i; int status; for (i = 0; i < MPI_CORE_SH_REGS_CNT; i++, buf++) { status = ql_write_mpi_reg(qdev, RISC_124, (SHADOW_OFFSET | i << SHADOW_REG_SHIFT)); if (status) goto end; status = ql_read_mpi_reg(qdev, RISC_127, buf); if (status) go...
false
false
false
false
false
0
title() const { return tkTr(Trans::Constants::GENERAL_PREFERENCES).remove("&"); }
false
false
false
false
false
0
decode_real(bgav_stream_t * s, gavl_video_frame_t * f) { real_priv_t * priv; bgav_packet_t * p; unsigned int transform_out[5]; transform_in_t transform_in; uint32_t * extra; dp_hdr_t* dp_hdr; char * dp_data; priv = s->data.video.decoder->priv; p = bgav_stream_get_packet_read(s); if(!p) ...
false
false
false
false
false
0
pack_restart(int i, double *buf) { int m = 0; buf[m++] = 4*npartner[i] + 2; buf[m++] = npartner[i]; for (int n = 0; n < npartner[i]; n++) { buf[m++] = partner[i][n]; buf[m++] = shearpartner[i][n][0]; buf[m++] = shearpartner[i][n][1]; buf[m++] = shearpartner[i][n][2]; } return m; }
false
false
false
false
false
0
get_consensus_relevant_terminal() { int i; if (is_terminal()) { if (dynamic_prop & ED4_P_CONSENSUS_RELEVANT) { return this->to_terminal(); } return NULL; } ED4_manager *manager = this->to_manager(); ED4_terminal *relevant_terminal = 0; int ...
false
false
false
false
false
0
UnDump(const BYTE * src) { if (!src) return 0; if (!Destroy()) return 0; if (!DestroyFrames()) return 0; DWORD n = 0; memcpy(&head,src,sizeof(BITMAPINFOHEADER)); n += sizeof(BITMAPINFOHEADER); memcpy(&info,&src[n],sizeof(CXIMAGEINFO)); n += sizeof(CXIMAGEINFO); if (!Create(head.biWidth, head.biHeight...
false
false
false
false
false
0
verse_send_t_text_set(VNodeID node_id, VBufferID buffer_id, uint32 pos, uint32 length, const char *text) { uint8 *buf; VOrderedStorage *s; unsigned int buffer_pos = 0; VCMDBufHead *head; head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ buf = ((VCMDBuffer10 *)head)->buf; buffer_pos += vnp_raw_p...
false
false
false
false
false
0
read( int* _cmd, QByteArray &data ) { // if it's still empty, then it's an error if (d->incomingTasks.isEmpty()) { //kWarning() << this << "Task list is empty!"; return -1; } const Task task = d->incomingTasks.dequeue(); //kDebug() << this << "Command " << task.cmd << " removed from ...
false
false
false
false
false
0
_talloc_realloc(const void *context, void *ptr, size_t size, const char *name) { struct talloc_chunk *tc; void *new_ptr; bool malloced = false; /* size zero is equivalent to free() */ if (unlikely(size == 0)) { talloc_unlink(context, ptr); return NULL; } if (unlikely(size >= MAX_TALLOC_SIZE)) { return NU...
false
false
false
false
true
1
print_candlelighting_times( int mask, int weekday, date_t todayGreg, int DST) { /* offset of sunset to candlelighting in minutes */ if (weekday == FRI || (mask & LIGHT_CANDLES)) { double xsunrise, xsunset; int day_adj, status; PrintGregDate (todayGreg); ...
false
false
false
false
false
0
GetData (GOGChemUtilsComponent *gogcu, gpointer *data, int *length, void (**clearfunc) (gpointer), G_GNUC_UNUSED gpointer *user_data) { gcr::Document *doc = static_cast <gcr::Document *> (gogcu->document); GOComponent *component = GO_COMPONENT (gogcu); bool result = false; xmlDocPtr xml = NULL; if (!doc || doc->G...
false
false
false
false
false
0
get_dowb_matrix_row(const FE_SPACE *fe_space, DOWBM_TYPE type) { DOWB_MATRIX_ROW *row; void *matrix_row_info = nil; int j; switch (type) { case dowbm_full: if(!fe_space || !fe_space->admin) { if(!unconnected_dowb_rows) unconnected_dowb_rows = newObject(sizeof(DOWB_MATRIX_ROW)+ROW_LENGTH*...
false
false
false
false
false
0
invalidate_global_renaming_pointers (void) { unsigned int i; tree iter; if (global_renaming_pointers == NULL) return; FOR_EACH_VEC_ELT (*global_renaming_pointers, i, iter) SET_DECL_RENAMED_OBJECT (iter, NULL_TREE); vec_free (global_renaming_pointers); }
false
false
false
false
false
0
ivtv_try_encoder_cmd(struct file *file, void *fh, struct v4l2_encoder_cmd *enc) { struct ivtv *itv = fh2id(fh)->itv; switch (enc->cmd) { case V4L2_ENC_CMD_START: IVTV_DEBUG_IOCTL("V4L2_ENC_CMD_START\n"); enc->flags = 0; return 0; case V4L2_ENC_CMD_STOP: IVTV_DEBUG_IOCTL("V4L2_ENC_CMD_STOP\n"); enc->flag...
false
false
false
false
false
0
locks_conflict(struct file_lock *caller_fl, struct file_lock *sys_fl) { if (sys_fl->fl_type == F_WRLCK) return 1; if (caller_fl->fl_type == F_WRLCK) return 1; return 0; }
false
false
false
false
false
0
early_irq_init(void) { int i, initcnt, node = first_online_node; struct irq_desc *desc; init_irq_default_affinity(); /* Let arch update nr_irqs and return the nr of preallocated irqs */ initcnt = arch_probe_nr_irqs(); printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt); if (WARN_ON(nr_ir...
false
false
false
false
false
0
showShieldingTensors(GtkWidget* textResult, VibCorrectionsGeom* geom, VibCorrectionsSigma* sigmas) { gchar tmp[BSIZE]; gint i; gint k,l; for(i=0;i<geom->numberOfAtoms;i++) { sprintf(tmp,"%s %f %f %f ", geom->atoms[i].symbol, geom->atoms[i].coordinates[0]*BOHR_TO_ANG, geom->atoms[i].coordinates[1]*BOH...
false
false
false
false
false
0
type_engine_scan1_return( Chuck_Env * env, a_Stmt_Return stmt ) { t_CKBOOL ret = FALSE; // check the type of the return if( stmt->val ) ret = type_engine_scan1_exp( env, stmt->val ); else ret = TRUE; return ret; }
false
false
false
false
false
0
setWindowMenu() { windowMenu->clear(); foreach (MainWindow *m, mainwindows) { windowMenu->addAction(m->cyclist); } }
false
false
false
false
false
0
asd_scan_finished(struct Scsi_Host *shost, unsigned long time) { /* give the phy enabling interrupt event time to come in (1s * is empirically about all it takes) */ if (time < HZ) return 0; /* Wait for discovery to finish */ sas_drain_work(SHOST_TO_SAS_HA(shost)); return 1; }
false
false
false
false
false
0
header_do(void *dummy, const char *key, const char *value) { request_rec *r = (request_rec *) dummy; const char *payload; payload = apr_table_get(r->headers_in, key); if (payload) { apr_table_setn(r->headers_out, value, payload); } return 1; }
false
false
false
false
false
0
e1000_clean(struct napi_struct *napi, int budget) { struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi); int tx_clean_complete = 0, work_done = 0; tx_clean_complete = e1000_clean_tx_irq(adapter, &adapter->tx_ring[0]); adapter->clean_rx(adapter, &adapter->rx_ring[0], &work_don...
false
false
false
false
false
0
___display_error ___P((char **msgs), (msgs) char **msgs;) { if (___setup_params.display_error != 0) ___setup_params.display_error (msgs); else if (___DEBUG_SETTINGS_LEVEL(___setup_params.debug_settings) > 0) { while (*msgs != 0) { char *msg = *msgs++; int len = 0...
false
false
false
false
false
0
create_copy_ins (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, int dest, int src, MonoInst *ins, const unsigned char *ip, int bank) { MonoInst *copy; MONO_INST_NEW (cfg, copy, regbank_move_ops [bank]); copy->dreg = dest; copy->sreg1 = src; copy->cil_code = ip; if (ins) { mono_bblock_insert_after_ins ...
false
false
false
false
false
0
dsp_set_run_state(struct hda_codec *codec) { unsigned int dbg_ctrl_reg; unsigned int halt_state; int err; err = chipio_read(codec, DSP_DBGCNTL_INST_OFFSET, &dbg_ctrl_reg); if (err < 0) return err; halt_state = (dbg_ctrl_reg & DSP_DBGCNTL_STATE_MASK) >> DSP_DBGCNTL_STATE_LOBIT; if (halt_state != 0) {...
false
false
false
false
false
0
get_ext(const char *filename) { const char *ext; char ch; if (*filename++ == '\0') return ""; for (ext = ""; (ch = *filename); filename++) if (ch == '.') ext = filename + 1; return ext; }
false
false
false
false
false
0
getDocumentRoot() { if (this->_document_root == "" && this->_parent != 0) this->_document_root = this->_parent->getDocumentRoot(); return this->_document_root; }
false
false
false
false
false
0