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
fluid_hashtable_insert_internal (fluid_hashtable_t *hashtable, void *key, void *value, int keep_new_key) { fluid_hashnode_t **node_ptr, *node; unsigned int key_hash; fluid_return_if_fail (hashtable != NULL); fluid_return_if_fail (hashtable->ref_count > 0); node_ptr...
false
false
false
false
false
0
aofAddFileSize(FILE *fp) { if(fp == NULL) return; struct redis_stat sb; if (redis_fstat(fileno(fp),&sb) == -1) { redisLog(REDIS_WARNING,"Unable to obtain the AOF file length. stat: %s", strerror(errno)); } else { server.aof_current_size += sb.st_size; } }
false
false
false
false
false
0
ExtractArg(char** args, bool asis /*= false*/) { if (!*args || !** args) return NULL; char* arg = ExtractQuotedOrLiteralArg(args, asis); if (!arg) arg = ExtractLinkArg(args); return arg; }
false
false
false
false
false
0
swf_def_hdr_jpeg(SWFReader *read) { if (read->jpeg_hdr) { swf_report(read, GF_NON_COMPLIANT_BITSTREAM, "JPEG Table already defined in file"); return GF_NON_COMPLIANT_BITSTREAM; } read->jpeg_hdr_size = read->size; if (read->size) { read->jpeg_hdr = gf_malloc(sizeof(char)*read->size); swf_read_data(read, read...
false
true
false
false
true
1
getValuesVector(const string& argument) const { if ( _resArgs.find(argument) == _resArgs.end() ) { cout << "ERROR: Looking for an argument (" << argument << ") that do not exists!" << endl; exit(1); } return _resArgs[argument]; }
false
false
false
false
false
0
qlcnic_ind_rd(struct qlcnic_adapter *adapter, u32 addr) { int err = 0; u32 data; if (qlcnic_82xx_check(adapter)) qlcnic_read_window_reg(addr, adapter->ahw->pci_base0, &data); else { data = QLCRD32(adapter, addr, &err); if (err == -EIO) return err; } return data; }
false
false
false
false
false
0
newSolution(double solValue) { ++numSolution; hasUB_ = true; CoinTreeNode* top = candidates_->top(); const double q = top ? top->getQuality() : solValue; const bool switchToDFS = fabs(q) < 1e-3 ? (fabs(solValue) < 0.005) : ((solValue-q)/fabs(q) < 0.005); if (switchToDFS && dynamic_cast<CoinSea...
false
false
false
false
false
0
fort_read_gint(char *line, gint start_col, gint end_col) { gchar *field; gdouble value; g_return_val_if_fail(start_col > 0, 0.0); g_return_val_if_fail(start_col <= end_col, 0.0); field = g_strndup(line+start_col-1, end_col-start_col+1); value = (gint) str_to_float(field); g_free(field); return(value); }
false
false
false
false
false
0
str_quote_cook(string_ty *s, int force) { const char *cp; int needs_quoting; static stracc buffer; int mode; unsigned char c; /* * Convert the work list to a single string. */ trace(("str_quote()\n{\n")); /* * Work out if the string needs...
false
false
false
false
true
1
validate_ntype(node *n, int t) { if (TYPE(n) != t) { PyErr_Format(parser_error, "Expected node type %d, got %d.", t, TYPE(n)); return 0; } return 1; }
false
false
false
false
false
0
gth_test_simple_real_load_from_element (DomDomizable *base, DomElement *element) { GthTestSimple *self; const char *value; g_return_if_fail (DOM_IS_ELEMENT (element)); self = GTH_TEST_SIMPLE (base); g_object_set (self, "visible", (g_strcmp0 (dom_element_get_attribute (element, "display"), "none") != 0...
false
false
false
false
true
1
thread_create_core(VALUE thval, VALUE args, VALUE (*fn)(ANYARGS)) { rb_thread_t *th; int err; if (OBJ_FROZEN(GET_THREAD()->thgroup)) { rb_raise(rb_eThreadError, "can't start a new thread (frozen ThreadGroup)"); } GetThreadPtr(thval, th); /* setup thread environment */ th->first_func = ...
false
false
false
false
false
0
UDFFindPartition( dvd_reader_t *device, int partnum, struct Partition *part ) { uint8_t LogBlock_base[ DVD_VIDEO_LB_LEN + 2048 ]; uint8_t *LogBlock = (uint8_t *)(((uintptr_t)LogBlock_base & ~((uintptr_t)2047)) + 2048); uint32_t lbnum, MVDS_location, MVDS_length; uint16_t TagID; in...
false
false
false
false
false
0
cik_didt_rreg(struct radeon_device *rdev, u32 reg) { unsigned long flags; u32 r; spin_lock_irqsave(&rdev->didt_idx_lock, flags); WREG32(CIK_DIDT_IND_INDEX, (reg)); r = RREG32(CIK_DIDT_IND_DATA); spin_unlock_irqrestore(&rdev->didt_idx_lock, flags); return r; }
false
false
false
false
false
0
lpfc_bsg_send_mgmt_rsp(struct fc_bsg_job *job) { struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; struct lpfc_hba *phba = vport->phba; struct send_mgmt_resp *mgmt_resp = (struct send_mgmt_resp *) job->request->rqst_data.h_vendor.vendor_cmd; struct ulp_bde64 *bpl; struct lpfc_dmabuf *bmp = NU...
false
false
false
false
false
0
jack_internal_client_handle(jack_client_t* ext_client, const char* client_name, jack_status_t* status) { JackGlobals::CheckContext("jack_internal_client_handle"); JackClient* client = (JackClient*)ext_client; if (client == NULL) { jack_error("jack_internal_client_handle called with a NULL client");...
false
false
false
false
false
0
texel_fetch(struct brw_reg dst) { static const sampler_message_arg gen6_args[5] = { SAMPLER_MESSAGE_ARG_U_INT, SAMPLER_MESSAGE_ARG_V_INT, SAMPLER_MESSAGE_ARG_ZERO_INT, /* R */ SAMPLER_MESSAGE_ARG_ZERO_INT, /* LOD */ SAMPLER_MESSAGE_ARG_SI_INT }; static const sampler_message_arg ge...
false
false
false
false
false
0
print_classes (FILE *f, bool pressure_p) { int classes_num = (pressure_p ? ira_pressure_classes_num : ira_allocno_classes_num); enum reg_class *classes = (pressure_p ? ira_pressure_classes : ira_allocno_classes); enum reg_class *class_translate = (pressure_p ? ira_pressure_class_translate ...
false
false
false
false
false
0
opts_store(struct device_driver *ddp, const char *buf, size_t count) { int opts; char work[20]; if (1 == sscanf(buf, "%10s", work)) { if (0 == strncasecmp(work,"0x", 2)) { if (1 == sscanf(&work[2], "%x", &opts)) goto opts_done; } else { if (1 == sscanf(work, "%d", &opts)) goto o...
false
false
false
false
false
0
ConvertToUnit( vtkGenericStreamTracer::IntervalInformation& interval, int unit, double cellLength, double speed) { double retVal = 0.0; switch (unit) { case TIME_UNIT: retVal = ConvertToTime(interval, cellLength, speed); break; case LENGTH_UNIT: retVal = ConvertToLength(inte...
false
false
false
false
false
0
talloc_get_name(const void *ptr) { struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); if (unlikely(tc->name == TALLOC_MAGIC_REFERENCE)) { return ".reference"; } if (likely(tc->name)) { return tc->name; } return "UNNAMED"; }
false
false
false
false
false
0
lookup_project(const char* master_url) { int len1, len2; char *mu; len1 = (int)strlen(master_url); if (master_url[strlen(master_url)-1] == '/') len1--; for (unsigned int i=0; i<projects.size(); i++) { mu = projects[i]->master_url; len2 = (int)strlen(mu); if (mu[strlen(mu)-1...
false
false
false
false
false
0
import_obs_label (const char *s) { char tmp[VNAMELEN]; if (s == NULL) { return 1; } if (*s == '"' || *s == '\'') s++; if (*s == '\0') { return 1; } if (strlen(s) > VNAMELEN - 1) { return 0; } *tmp = '\0'; strncat(tmp, s, VNAMELEN - 1); gretl_lower(tmp); return (!...
true
true
true
false
false
1
add_abs(numeric *var1, numeric *var2, numeric *result) { NumericDigit *res_buf; NumericDigit *res_digits; int res_ndigits; int res_weight; int res_rscale; int res_dscale; int i, i1, i2; int carry = 0; /* copy these values into local vars for speed in inner loop */ int var1ndigits = var1...
false
false
false
false
false
0
iw_get_stats(int skfd, const char * ifname, iwstats * stats, const iwrange * range, int has_range) { /* Fortunately, we can always detect this condition properly */ if((has_range) && (range->we_version_compiled > 11)) { struct iwreq wrq; wrq.u.data.pointer = (caddr_t) sta...
false
false
false
false
true
1
frame_free_buffers(mpg123_handle *fr) { if(fr->rawbuffs != NULL) free(fr->rawbuffs); fr->rawbuffs = NULL; fr->rawbuffss = 0; if(fr->rawdecwin != NULL) free(fr->rawdecwin); fr->rawdecwin = NULL; fr->rawdecwins = 0; #ifndef NO_8BIT if(fr->conv16to8_buf != NULL) free(fr->conv16to8_buf); fr->conv16to8_buf = NULL; #...
false
false
false
false
false
0
ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb) { struct ieee80211_hdr_3addr *pwh, wh; struct ath6kl_llc_snap_hdr *llc_hdr; struct ethhdr eth_hdr; u32 hdr_size; u8 *datap; __le16 sub_type; if (WARN_ON(skb == NULL)) return -EINVAL; datap = skb->data; pwh = (struct ieee80211_hdr_3addr *) da...
false
false
false
false
false
0
batch_push(int nreg, double delay) { int k; batch_copyregion(batch_reg, batch_dxs, batch_dys, nreg, delay); /* XXX Y */ fb_push(); for (k=0; k < nreg; k++) { sraRgnDestroy(batch_reg[k]); } }
false
false
false
false
false
0
ocrdma_irq_handler(int irq, void *handle) { struct ocrdma_eq *eq = handle; struct ocrdma_dev *dev = eq->dev; struct ocrdma_eqe eqe; struct ocrdma_eqe *ptr; u16 cq_id; u8 mcode; int budget = eq->cq_cnt; do { ptr = ocrdma_get_eqe(eq); eqe = *ptr; ocrdma_le32_to_cpu(&eqe, sizeof(eqe)); mcode = (eqe.id_val...
false
false
false
false
false
0
_wnck_application_create (Window xwindow, WnckScreen *screen) { WnckApplication *application; Screen *xscreen; if (app_hash == NULL) app_hash = g_hash_table_new_full (_wnck_xid_hash, _wnck_xid_equal, NULL, g_object_unref); g_ret...
false
false
false
false
false
0
GMenuBarFindXs(GMenuBar *mb) { int i, wid; GDrawSetFont(mb->g.base,mb->font); #if 1 wid = GDrawPointsToPixels(mb->g.base,8); mb->xs[0] = GDrawPointsToPixels(mb->g.base,2); for ( i=0; i<mb->mtot; ++i ) mb->xs[i+1] = mb->xs[i]+wid+GTextInfoGetWidth(mb->g.base,&mb->mi[i].ti,NULL); #else for ( i=w...
false
false
false
false
false
0
ijmlist_ass_remove_by_ptr(jmlist jml,void *ptr) { jmlist_debug(__func__,"called with jml=%p and ptr=%p\n",(void*)jml,(void*)ptr); /* trying to pop from empty list? */ if( !jml->ass_list.usage ) { jmlist_debug(__func__,"trying to remove from empty list"); jmlist_debug(__func__,"returning with failure."); jmli...
false
false
false
false
false
0
ibus_bus_close_connection (IBusBus *bus) { g_free (bus->priv->unique_name); bus->priv->unique_name = NULL; bus->priv->watch_dbus_signal_id = 0; bus->priv->watch_ibus_signal_id = 0; g_free (bus->priv->bus_address); bus->priv->bus_address = NULL; /* Cancel ongoing connect request. */ g_...
false
false
false
false
false
0
create_grid_ELF_Dens_analyze(gboolean ongrid) { GtkWidget *Win; GtkWidget *frame; GtkWidget *hbox; GtkWidget *vboxall; GtkWidget *vboxwin; GtkWidget *button; GtkWidget** entries; if(!GeomOrb) { Message(_("Sorry, Please load a file before\n"),_("Error"),TRUE); return; } if(!CoefAlphaOrbitals && TypeGrid ...
false
false
false
false
false
0
current_decl_namespace (void) { tree result; /* If we have been pushed into a different namespace, use it. */ if (decl_namespace_list) return TREE_PURPOSE (decl_namespace_list); if (current_class_type) result = decl_namespace_context (current_class_type); else if (current_function_decl) result =...
false
false
false
false
false
0
qty_compare_1 (const void *q1p, const void *q2p) { int q1 = *(const int *) q1p, q2 = *(const int *) q2p; int tem = QTY_CMP_PRI (q2) - QTY_CMP_PRI (q1); if (tem != 0) return tem; /* If qtys are equally good, sort by qty number, so that the results of qsort leave nothing to chance. */ return q1 - q2...
false
false
false
false
false
0
server_create_notify(DBusGProxy *proxy, DBusGProxyCall *call, gpointer data) { GError *error = NULL; const char *path = NULL; DEBUG(GYPSY_SERVER": Create: Notify"); dbus_g_proxy_end_call(proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &path, G_TYPE_INVALID); if (error) { WARNING(GYPSY_SERVER": Create: %s", ...
false
false
false
false
false
0
je_calloc(size_t num, size_t size) { void *ret; size_t num_size; size_t usize JEMALLOC_CC_SILENCE_INIT(0); prof_thr_cnt_t *cnt JEMALLOC_CC_SILENCE_INIT(NULL); if (malloc_init()) { num_size = 0; ret = NULL; goto label_return; } num_size = num * size; if (num_size == 0) { if (num == 0 || size == 0) n...
false
false
false
false
false
0
on_check_get_attributes (GObject *source, GAsyncResult *result, gpointer user_data) { GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data); CheckClosure *closure = g_simple_async_result_get_op_res_gpointer (res); GError *error = NULL; closure->attrs = gck_ob...
false
false
false
false
false
0
LoadPetDefaultSpells_helper(CreatureInfo const* cInfo, PetDefaultSpellsEntry& petDefSpells) { // skip empty list; bool have_spell = false; for (int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j) { if (petDefSpells.spellid[j]) { have_spell = true; break; } ...
false
false
false
false
false
0
G__color_free_lookup(struct _Color_Info_ *cp) { if (cp->lookup.active) { G_free(cp->lookup.red); G_free(cp->lookup.blu); G_free(cp->lookup.grn); G_free(cp->lookup.set); cp->lookup.active = 0; } return 0; }
false
false
false
false
false
0
dump(std::ostream &out) const { out << std::endl << "\tJPEG_SOF_Parameters:" << std::endl; out << "\t\t SamplePrecision = " << SamplePrecision << std::endl; out << "\t\t nLines = " << nLines << std::endl; out << "\t\t nSamplesPerLine = " << nSamplesPerLine << std::endl; ...
false
false
false
false
false
0
cb_gimmix_tag_editor_error_response (GtkDialog *dialog, gint arg1, gpointer data) { if (arg1 == GTK_RESPONSE_YES) { extern GtkWidget *pref_notebook; gtk_notebook_set_current_page (GTK_NOTEBOOK(pref_notebook), 2); gimmix_prefs_dialog_show (); } gtk_widget_destroy (GTK_WIDGET(dialog)); return; }
false
false
false
false
false
0
mine(dwarf *dwarf) { if(dwarf->pos == rock_pos - 1) { rock_pos++; } if(world[dwarf->pos + 1] > 0) { world[dwarf->pos + 1]--; dwarf->rocks++; } }
false
false
false
false
false
0
read_basis_types_from_a_mopac_output_file(gchar *FileName, gint* nrs) { gchar **strbasis; FILE *file; if ((!FileName) || (strcmp(FileName,"") == 0)) { Message(_("Sorry No file selected\n"),_("Error"),TRUE); return NULL; } file = FOpen(FileName, "rb"); if(file ==NULL) { gchar buffer[BSIZE]; ...
false
false
false
false
false
0
NeedWrapping(int docLineStart, int docLineEnd) { //Platform::DebugPrintf("\nNeedWrapping: %0d..%0d\n", docLineStart, docLineEnd); if (wrapPending.AddRange(docLineStart, docLineEnd)) { llc.Invalidate(LineLayout::llPositions); } // Wrap lines during idle. if ((wrapState != eWrapNone) && wrapPending.NeedsWrap()) { ...
false
false
false
false
false
0
nautilus_x_content_bar_set_mount (NautilusXContentBar *bar, GMount *mount) { if (bar->priv->mount != NULL) { g_object_unref (bar->priv->mount); } bar->priv->mount = mount != NULL ? g_object_ref (mount) : NULL; }
false
false
false
false
false
0
conn_read_entry_attribute(Repl_Connection *conn, const char *dn, char *type, struct berval ***returned_bvals) { ConnResult return_value; int ldap_rc; LDAPControl *server_controls[2]; LDAPMessage *res = NULL; char *attrs[2]; PR_ASSERT(NULL != type); if (conn_connected(conn)) { server_controls[0] = &manageDSA...
true
true
false
false
false
1
radeonRenderPrimitive( struct gl_context *ctx, GLenum prim ) { r100ContextPtr rmesa = R100_CONTEXT(ctx); GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL); rmesa->radeon.swtcl.render_primitive = prim; if (prim < GL_TRIANGLES || !unfilled) ...
false
false
false
false
false
0
setChildWidetVisibility(bool show) { Q_FOREACH(QGraphicsItem *item, this->childItems()) { (show) ? item->show() : item->hide(); } }
false
false
false
false
false
0
opal_uri_get_scheme(const char *uri) { char *turi = strdup(uri); char *ptr; if (NULL == (ptr = strchr(turi, ':'))) { opal_show_help("help-opal-util.txt", "malformed-uri", true, uri); return NULL; } *ptr = '\0'; return turi; }
false
false
false
false
false
0
process_md_delete_mdl_req(struct mcap_mcl *mcl, void *cmd, uint32_t len) { mcap_md_req *req; struct mcap_mdl *mdl, *aux; uint16_t mdlid; gboolean notify; GSList *l; if (!check_cmd_req_length(mcl, cmd, len, sizeof(mcap_md_req), MCAP_MD_DELETE_MDL_RSP)) return; req = cmd; mdlid = ntohs(req->mdl...
false
false
false
false
false
0
rtl92cu_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_usb_priv *usbpriv = rtl_usbpriv(hw); u8 ledcfg; RT_TRACE(rtlpriv, COMP_LED, DBG_LOUD, "LedAddr:%X ledpin=%d\n", REG_LEDCFG2, pled->ledpin); ledcfg = rtl_read_byte(rtlpriv, REG_LEDCFG2); swit...
false
false
false
false
false
0
addCredit( const KLocalizedString &name, const KLocalizedString &task, const QByteArray &emailAddress, const QByteArray &webAddress ) { d->_creditList.append(KAboutPerson(name,task,emailAddress,webAddress)); ret...
false
false
false
false
false
0
padd_item(char *item, int total_length, int length) { int i; for (i = total_length; i > length;) item[--i] = 0; }
false
false
false
false
false
0
AddLanguageFlags(std::string& flags, const char* lang, const char* config) { // Add language-specific flags. std::string flagsVar = "CMAKE_"; flagsVar += lang; flagsVar += "_FLAGS"; if(this->EmitUniversalBinaryFlags) { con...
false
false
false
false
false
0
ajLong2dGet(const AjPLong2d thys, ajuint elem1, ajuint elem2) { AjPLong t; if(!thys || elem1>=thys->Len) ajErr("Attempt to access bad ajlong array index [%d][%d]\n",elem1, elem2); t = thys->Ptr[elem1]; if(!t) ajErr("Attempt to access bad 1st dimension [%d][]\n",elem1); return ajLongGet(...
false
false
false
true
false
1
do_truncation(struct ubifs_info *c, struct inode *inode, const struct iattr *attr) { int err; struct ubifs_budget_req req; loff_t old_size = inode->i_size, new_size = attr->ia_size; int offset = new_size & (UBIFS_BLOCK_SIZE - 1), budgeted = 1; struct ubifs_inode *ui = ubifs_inode(inode); dbg_gen("ino %lu, si...
false
false
false
false
false
0
dvb_usb_data_complete_raw(struct usb_data_stream *stream, u8 *buffer, size_t length) { struct dvb_usb_adapter *adap = stream->user_priv; if (adap->feedcount > 0 && adap->state & DVB_USB_ADAP_STATE_DVB) dvb_dmx_swfilter_raw(&adap->demux, buffer, length); }
false
false
false
false
false
0
globus_i_gfs_monitor_init( globus_i_gfs_monitor_t * monitor) { GlobusGFSName(globus_i_gfs_monitor_init); GlobusGFSDebugEnter(); globus_mutex_init(&monitor->mutex, NULL); globus_cond_init(&monitor->cond, NULL); monitor->done = GLOBUS_FALSE; GlobusGFSDebugExit(); }
false
false
false
false
false
0
status_str( Status status ) { switch ( status ) { case UNKNOWN: return "unknown"; case GOTNATIVE: return "gotnative"; case PENDING_USE_CS: return "pending_use_cs"; case JOBDONE: return "jobdone"; case LINKJOB: ...
false
false
false
false
false
0
pat_bsp_init(u64 pat) { u64 tmp_pat; if (!boot_cpu_has(X86_FEATURE_PAT)) { pat_disable("PAT not supported by CPU."); return; } rdmsrl(MSR_IA32_CR_PAT, tmp_pat); if (!tmp_pat) { pat_disable("PAT MSR is 0, disabled."); return; } wrmsrl(MSR_IA32_CR_PAT, pat); pat_initialized = true; __init_cache_modes...
false
false
false
false
false
0
format_mime_size(char *string, size_t stringlen, struct mail_bodystruct *b, int flags) { char tmp[10], *p = NULL; char *origstring; if(stringlen <= 0) return; origstring = string; if(flags & FMS_SPACE) *string++ = ' '; switch(b->encoding){ case ENCBASE64 : if(b->type == T...
false
false
false
false
false
0
__ecereInstMeth_ThreadsView_OnSelectThread__00000016(struct __ecereNameSpace__ecere__com__Instance * this, int threadId) { struct ThreadsView * __ecerePointer_ThreadsView = (struct ThreadsView *)(this ? (((char *)this) + __ecereClass_ThreadsView->offset) : 0); if(threadId) __ecereMethod_Debugger_SelectThread(((struct ...
false
false
false
false
false
0
open_file(const std::string& fname, const std::string& fmode) { fname_rep = fname; f1 = std::fopen(fname_rep.c_str(), fmode.c_str()); if (!f1) { mode_rep = ""; } else { mode_rep = fmode; } standard_mode = false; curpos_rep = 0; }
false
false
false
false
true
1
main(int argc, char *argv[]) { char *delegation_id = "_", *proxycache = "", *user_dn = "", *proxyfile = NULL; int c, outsidecache = 0, verbose = 0, option_index; struct option long_options[] = { {"verbose", 0, 0, 'v'}, {"outsidecache", 0, 0, 0}...
false
true
false
false
true
1
git_diff_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { GiggleGitDiffPriv *priv; priv = GET_PRIV (object); switch (param_id) { case PROP_REV1: if (priv->rev1) g_object_unref (priv->rev1); priv->rev1 = GIGGLE_REVISION (g_va...
false
false
false
false
false
0
test_config_global__open_global(void) { git_config *cfg, *global, *selected, *dummy; cl_git_pass(git_config_open_default(&cfg)); cl_git_pass(git_config_open_level(&global, cfg, GIT_CONFIG_LEVEL_GLOBAL)); cl_git_fail(git_config_open_level(&dummy, cfg, GIT_CONFIG_LEVEL_XDG)); cl_git_pass(git_config_open_global(&sel...
false
false
false
false
false
0
sti_sas_spdif_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct snd_soc_codec *codec = dai->codec; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: return snd_soc_update_bits(codec, STIH407_AUDIO_GLUE_CTRL, SPDIF_BIPHASE_ENABLE...
false
false
false
false
false
0
bnx2x_fill_frag_skb(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_agg_info *tpa_info, u16 pages, struct sk_buff *skb, struct eth_end_agg_rx_cqe *cqe, u16 cqe_idx) { struct sw_rx_page *rx_pg, old_rx_pg; u32 i, frag_len, frag_size; int err, j, frag_id = 0; ...
false
false
false
false
false
0
setup_debug_log_signals (void) { struct sigaction sa; GIOChannel *io; if (pipe (debug_log_pipes) == -1) { g_error ("Could not create pipe() for debug log"); } io = g_io_channel_unix_new (debug_log_pipes[0]); g_io_add_watch (io, G_IO_IN, debug_log_io...
false
false
false
false
false
0
main(int argc, char **argv) { DCM_OBJECT * object; CONDITION cond; CTNBOOLEAN verbose = FALSE; int group; char *outputFile; unsigned long options = DCM_ORDERLITTLEENDIAN; unsigned long outputOptions = DCM_ORDERLITTLEENDIAN; while (--argc > 0 && (*++argv)[...
false
false
false
false
false
0
unistimsock_read(int *id, int fd, short events, void *ignore) { struct sockaddr_in addr_from = { 0, }; struct unistimsession *cur = NULL; int found = 0; int tmp = 0; int dw_num_bytes_rcvd; unsigned int size_addr_from; #ifdef DUMP_PACKET int dw_num_bytes_rcvdd; #endif size_addr_from = sizeof(addr_from); dw_num...
false
false
false
false
false
0
gnm_validation_new (ValidationStyle style, ValidationType type, ValidationOp op, Sheet *sheet, char const *title, char const *msg, GnmExprTop const *texpr0, GnmExprTop const *texpr1, gboolean allow_blank, gboolean use_dropdown) { GnmValidation *v; int nops; g_return_val_if_fail (type >= 0, NULL); g_ret...
false
false
false
false
false
0
vidioc_s_fmt(struct emmaprp_ctx *ctx, struct v4l2_format *f) { struct emmaprp_q_data *q_data; struct vb2_queue *vq; int ret; vq = v4l2_m2m_get_vq(ctx->m2m_ctx, f->type); if (!vq) return -EINVAL; q_data = get_q_data(ctx, f->type); if (!q_data) return -EINVAL; if (vb2_is_busy(vq)) { v4l2_err(&ctx->dev->v...
false
false
false
false
false
0
of_LOAD_AVP0(vthread_t thr, vvp_code_t cp) { unsigned wid = cp->bit_idx[1]; unsigned adr = thr->words[3].w_int; /* The result is 'bx if the address is undefined. */ if (thr_get_bit(thr, 4) == BIT4_1) { unsigned bit = cp->bit_idx[0]; thr_check_addr(thr, bit+wid-1); vvp_vector4_t tmp (w...
false
false
false
false
false
0
verify_item(const char *prompt, int item) { char o_name[80]; char out_val[160]; object_type *o_ptr; /* Inventory */ if (item >= 0) { o_ptr = &p_ptr->inventory[item]; } /* Floor */ else { o_ptr = object_byid(0 - item); } /* Describe */ object_desc(o_name, sizeof(o_name), o_ptr, ODESC_PREFIX | ODESC...
true
true
false
false
false
1
cff_Index_size(uint count, uint total) { return (count == 0 ? 2 : 3 + offset_size(total + 1) * (count + 1) + total); }
false
false
false
false
false
0
compute_lookthrough_limit( Slapi_PBlock *pb, struct ldbminfo *li ) { Slapi_Connection *conn = NULL; int limit; Slapi_Operation *op; slapi_pblock_get( pb, SLAPI_CONNECTION, &conn); slapi_pblock_get( pb, SLAPI_OPERATION, &op); if ( slapi_reslimit_get_integer_limit( conn, ...
false
false
false
false
false
0
handle_emptytag(void *clientdata, string name, pairlist attribs) { pairlist p; if (skipping == 0) { printf("<%s", name); for (p = attribs; p != NULL; p = p->next) { printf(" %s", p->name); if (p->value != NULL) printf("=\"%s\"", p->value); } printf(" />"); } }
false
false
false
false
false
0
DecompressColour( u8* rgba, void const* block, bool isDxt1 ) { // get the block bytes u8 const* bytes = reinterpret_cast< u8 const* >( block ); // unpack the endpoints u8 codes[16]; int a = Unpack565( bytes, codes ); int b = Unpack565( bytes + 2, codes + 4 ); // generate the midpoints for( int i = 0; i < 3;...
false
false
false
false
false
0
recurse_directories_internal(gchar *name, GSList **trknames, gboolean descend, GHashTable **directories_seen) { if (g_file_test(name, G_FILE_TEST_IS_DIR)) { GDir *dir = g_dir_open(name, 0, NULL); if (dir != NULL) { const gchar *next; do { next = g_dir_read_nam...
false
false
false
false
false
0
arbel_post_recv ( struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf ) { struct arbel *arbel = ib_get_drvdata ( ibdev ); struct arbel_queue_pair *arbel_qp = ib_qp_get_drvdata ( qp ); struct ib_work_queue *wq = &qp->recv; struct arbel_recv_work_queue *arbel_recv_wq = &arbel_qp...
false
false
false
false
false
0
do_initrd_list (const char *path) { FILE *fp; CLEANUP_FREE char *cmd = NULL; DECLARE_STRINGSBUF (filenames); CLEANUP_FREE char *filename = NULL; size_t allocsize; ssize_t len; /* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */ if (asprintf_nowarn (&cmd, "%s %R | %s --quiet -it", ...
false
false
false
false
true
1
Xfor(void) { if(runq->argv->words==0){ poplist(); runq->pc = runq->code[runq->pc].i; } else{ freelist(runq->local->val); runq->local->val = runq->argv->words; runq->local->changed = 1; runq->argv->words = runq->argv->words->next; runq->local->val->next = 0; runq->pc++; } }
false
false
false
false
false
0
SDL_PALETTE_Calculate32_A8R8G8B8(VIDEOMODE_MODE_t mode) { int *pal = SDL_PALETTE_tab[mode].palette; int size = SDL_PALETTE_tab[mode].size; int i; for (i = 0; i < size; i++) { SDL_PALETTE_buffer.bpp32[i] = 0xff000000 | pal[i]; } }
false
false
false
false
false
0
update(void) const { if (mDerivedTransformDirty) { if (mParentNode) { // Ok, update with SceneNode we're attached to mDerivedDirection = mParentNode->convertLocalToWorldDirection(mDirection, false); mDerivedPosition = mParentNod...
false
false
false
false
false
0
get_global_attributes() const { BOOST_LOG_EXPR_IF_MT(implementation::scoped_read_lock lock(m_impl->m_mutex);) return m_impl->m_global_attributes; }
false
false
false
false
false
0
fso_gsm_gsm_pdp_service_real_get_roaming_allowed (FreeSmartphoneGSMPDP* base) { gboolean result; FsoGsmGsmPdpService* self; FsoGsmModem* _tmp0_ = NULL; FsoGsmModemData* _tmp1_ = NULL; FsoGsmModemData* _tmp2_ = NULL; gboolean _tmp3_ = FALSE; gboolean _tmp4_ = FALSE; self = (FsoGsmGsmPdpService*) base; _tmp0_ = ...
false
false
false
false
false
0
_GButton_SetDefault(GGadget *g,int32 is_default) { GButton *gb = (GButton *) g; GRect maxr; int scale = GDrawPointsToPixels(g->base,1); int def_size = (g->box->flags & box_draw_default)?scale+GDrawPointsToPixels(g->base,2):0; if ( gb->is_default == is_default ) return; gb->is_default = is_defau...
false
false
false
false
false
0
socket_read(struct imap_socket *sock, char *buf, int len) { ssize_t n; #ifndef NO_OPENSSL if (sock->ssl) n = SSL_read(sock->ssl, buf, len); else #endif n = xread(sock->fd, buf, len); if (n <= 0) { socket_perror("read", sock, n); close(sock->fd); sock->fd = -1; } return n; }
false
false
false
false
false
0
DoPushArgument(LPushArgument* instr) { LOperand* argument = instr->InputAt(0); if (argument->IsConstantOperand()) { EmitPushConstantOperand(argument); } else if (argument->IsRegister()) { __ push(ToRegister(argument)); } else { ASSERT(!argument->IsDoubleRegister()); __ push(ToOperand(argument));...
false
false
false
false
false
0
panel_bindings_set_entries (GtkBindingSet *binding_set) { int i; if (!initialised) panel_bindings_initialise (); for (i = 0; i < G_N_ELEMENTS (bindings); i++) { if (!bindings [i].list) continue; panel_binding_set_entry (&bindings [i], binding_set); } }
false
false
false
false
false
0
fm_thumbnailer_launch_for_uri(FmThumbnailer* thumbnailer, const char* uri, const char* output_file, guint size) { char* cmd_line = fm_thumbnailer_command_for_uri(thumbnailer, uri, output_file, size); if(cmd_line) { int status; /* TODO: this call is blocking. Do we have a better way to make ...
false
false
false
false
false
0
loop_config_discard(struct loop_device *lo) { struct file *file = lo->lo_backing_file; struct inode *inode = file->f_mapping->host; struct request_queue *q = lo->lo_queue; /* * We use punch hole to reclaim the free space used by the * image a.k.a. discard. However we do not support discard if * encryption is...
false
false
false
false
false
0
xdr_yppushresp_xfr (XDR *xdrs, yppushresp_xfr *objp) { if (!xdr_u_int (xdrs, &objp->transid)) return FALSE; return xdr_yppush_status (xdrs, &objp->status); }
false
false
false
false
false
0
cayman_dma_resume(struct radeon_device *rdev) { struct radeon_ring *ring; u32 rb_cntl, dma_cntl, ib_cntl; u32 rb_bufsz; u32 reg_offset, wb_offset; int i, r; for (i = 0; i < 2; i++) { if (i == 0) { ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX]; reg_offset = DMA0_REGISTER_OFFSET; wb_offset = R600_WB_DMA_...
false
false
false
false
false
0
garcon_menu_resolve_items (GarconMenu *menu, GHashTable *desktop_id_table, gboolean only_unallocated) { GSList *rules = NULL; GSList *iter; GList *submenu; gboolean menu_only_unallocated = FALSE; g_return_if_fail (GARCON_IS_MENU (menu)); menu_on...
false
false
false
false
false
0
uniq_add(struct uniq *U, const char *key, uint32_t key_len, char **rhash) { unsigned int i; uint8_t digest[16]; cli_md5_ctx md5; struct UNIQMD5 *m = NULL; cli_md5_init(&md5); cli_md5_update(&md5, key, key_len); cli_md5_final(digest, &md5); if(U->items && U->md5s[U->idx[*digest]].md5[0]==*digest) f...
false
false
false
false
false
0
find_conf_host(Link *lp, char *host, int statmask) { Reg aConfItem *tmp; int hostlen = host ? strlen(host) : 0; if (hostlen > HOSTLEN || BadPtr(host)) return (aConfItem *)NULL; for (; lp; lp = lp->next) { tmp = lp->value.aconf; if (tmp->status & statmask && (!(tmp->status & CONF_SERVER_MASK || t...
false
false
false
false
false
0