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
property(const QString &name) { KConfigSkeletonItem *item = KConfigSkeleton::findItem(name); if (item) { return item->property(); } return QVariant(); }
false
false
false
false
false
0
DoLibsOptions(TiXmlElement* parentNode, ProjectBuildTarget* target) { TiXmlElement* node = parentNode->FirstChildElement("LibDirs"); if (!node) return; // no options TiXmlElement* child = node->FirstChildElement("Add"); while (child) { wxString option = UnixFilename(cbC2U(child->Att...
false
false
false
false
false
0
std_hash_node_destroy(struct ghashnode *hash_node, STDDestroyNotify key_destroy_func, STDDestroyNotify value_destroy_func) { if (key_destroy_func) key_destroy_func(hash_node->key); if (value_destroy_func) value_destroy_func(hash_node->value); hash_node->key = NULL; hash_node->va...
false
false
false
false
false
0
bcma_pmu_init(struct bcma_drv_cc *cc) { if (cc->pmu.rev == 1) bcma_cc_mask32(cc, BCMA_CC_PMU_CTL, ~BCMA_CC_PMU_CTL_NOILPONW); else bcma_cc_set32(cc, BCMA_CC_PMU_CTL, BCMA_CC_PMU_CTL_NOILPONW); bcma_pmu_pll_init(cc); bcma_pmu_resources_init(cc); bcma_pmu_workarounds(cc); }
false
false
false
false
false
0
f_mkselvar(const char *prefix, int level) { std::ostringstream os; os << prefix << level; return Id( Str( mkcasestring( os.str().c_str() ))); }
false
false
false
false
false
0
SetGeogCS( const char * pszGeogName, const char * pszDatumName, const char * pszSpheroidName, double dfSemiMajor, double dfInvFlattening, const char * pszPMName, double dfPMOffset, ...
false
false
false
false
false
0
get_max_loopno_tag(Block *block_head, const int tlg_tag) { Block *bpt; int loopno_tag = 0; for (bpt = block_head; bpt != NULL; bpt = bpt->next) { if (block_has_tlg_tag(bpt) && bpt->tlg_tag == tlg_tag && loopno_tag < bpt->loopno_tag) { loopno_tag = bpt->loopno_tag; } ...
false
false
false
false
false
0
file_browser_node_set_from_info (GeditFileBrowserStore *model, FileBrowserNode *node, GFileInfo *info, gboolean isadded) { gchar const *content; gboolean free_info = FALSE; GtkTreePath *path; gchar *uri; GError *error = NULL; if (info == NULL) { info = g_file_que...
false
false
false
false
false
0
cw1200_register_common(struct ieee80211_hw *dev) { struct cw1200_common *priv = dev->priv; int err; #ifdef CONFIG_PM err = cw1200_pm_init(&priv->pm_state, priv); if (err) { pr_err("Cannot init PM. (%d).\n", err); return err; } #endif err = ieee80211_register_hw(dev); if (err) { pr_err("Cannot re...
false
false
false
false
false
0
iter_get(lenb, lenx) int lenb, lenx; { ITER *ip; if ((ip = NEW(ITER)) == (ITER *) NULL) error(E_MEM,"iter_get"); else if (mem_info_is_on()) { mem_bytes(TYPE_ITER,0,sizeof(ITER)); mem_numvar(TYPE_ITER,1); } /* default values */ ip->shared_x = FALSE; ip->shared_b = FALSE; ip...
false
false
false
true
false
1
max98095_handle_pdata(struct snd_soc_codec *codec) { struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); struct max98095_pdata *pdata = max98095->pdata; u8 regval = 0; if (!pdata) { dev_dbg(codec->dev, "No platform data\n"); return; } /* Configure mic for analog/digital mic mode */ if (pdata...
false
false
false
false
false
0
handle_query (XDMCPServer *server, GSocket *socket, GSocketAddress *address, XDMCPPacket *packet) { XDMCPPacket *response; gchar **i; gchar *authentication_name = NULL; /* If no authentication requested and we are configured for none then allow */ if (packet->Query.authentication_names[0] == NULL &...
false
false
false
false
false
0
server_start(const bdaddr_t *src) { struct input_server *server; GError *err = NULL; server = g_new0(struct input_server, 1); bacpy(&server->src, src); server->ctrl = bt_io_listen(BT_IO_L2CAP, connect_event_cb, NULL, server, NULL, &err, BT_IO_OPT_SOURCE_BDADDR, src, BT_IO_OPT_PSM, L2CAP_PSM_HIDP_CTRL...
false
false
false
false
false
0
make_discover (client, lease) struct client_state *client; struct client_lease *lease; { unsigned char discover = DHCPDISCOVER; struct option_state *options = (struct option_state *)0; memset (&client -> packet, 0, sizeof (client -> packet)); make_client_options (client, lease, &discover, (struct option...
false
false
false
false
false
0
getLastBoundIndex(void) const { return mBindingMap.empty() ? 0 : mBindingMap.rbegin()->first + 1; }
false
false
false
false
false
0
cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB) { __u32 capabilities = 0; /* init fields common to all four types of SessSetup */ /* Note that offsets for first seven fields in req struct are same */ /* in CIFS Specs so does not matter which of 3 forms of struct */ /* that we use in next few line...
false
false
false
false
false
0
rc4_start(prng_state *prng) { LTC_ARGCHK(prng != NULL); /* set keysize to zero */ prng->rc4.x = 0; return CRYPT_OK; }
false
false
false
true
false
1
FillSource(std::vector<std::string>& val) const { if (this->m_Dims.size() == 0) { if (val.size() != 1) { val.resize(1, " "); val[0].resize(1, ' '); } } else { int prod = this->GetDimensionsProduct(1); val.resize(prod, std::string(this->m_Dims[0], ' '))...
false
false
false
false
false
0
drop_indexed_docs(void* closure, SquatListDoc const* doc) { SquatSearchResult* r = (SquatSearchResult*)closure; int doc_uid = parse_doc_name(r, doc->doc_name); if (doc_uid >= 0) { unsigned char* vect = r->vector; vect[doc_uid >> 3] &= ~(1 << (doc_uid & 0x7)); } return SQUAT_CALLBACK_CONTINUE; }
false
false
false
false
false
0
gst_rtp_dv_depay_reset (GstRTPDVDepay * depay) { if (depay->acc) gst_buffer_unref (depay->acc); depay->acc = NULL; depay->prev_ts = -1; depay->header_mask = 0; }
false
false
false
false
false
0
decode_float (const cl_DF& x) { // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return decoded_dfloat(cl_DF_0, 0, cl_DF_1); }, sign=,exp=,mant= ); return decoded_dfloat( encode_DF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e al...
false
false
false
false
false
0
gwy_app_data_browser_spectra_selected(GtkTreeSelection *selection, GwyAppDataBrowser *browser) { GwySpectra *tspectra, *aspectra; GwyContainer *data; GtkTreeModel *model; GtkTreeIter iter; const gchar *strkey; GwyAppKeyType type; GQuark quark; gint i...
false
false
false
false
false
0
hnae_list_del(spinlock_t *lock, struct list_head *node) { unsigned long flags; spin_lock_irqsave(lock, flags); list_del_rcu(node); spin_unlock_irqrestore(lock, flags); }
false
false
false
false
false
0
pa_atod(const char* str, const String* problem_source) { if(!str) return 0; while(isspace(*str)) str++; if(!*str) return 0; bool negative=false; if(str[0]=='-') { negative=true; str++; } else if(str[0]=='+') { str++; } double result; if(str[0]=='0') if(str[1]=='x' || str[1]=='X'){ // 0xABC...
false
false
false
false
false
0
redirect_output(bool redirect, int fileno, int *pipedes) { if(redirect) { close(fileno); dup2(pipedes[1], fileno); close(pipedes[1]); fcntl(fileno, F_SETFL, O_NONBLOCK); } else { close(pipedes[1]); close(fileno); } close(pipedes[0]); }
false
false
false
false
true
1
buffer_dump(struct buffer *b) { int i; printf("--buffer dump:buflen<%d>,pos<%d>\n", b->buflen, b->NUL); for (i = 0; i < b->NUL; i++) printf("\t[%d] %c\n", i, b->buf[i]); }
false
false
false
false
false
0
strtolval(char *s, long int *val, long int minmum, long int maxmum, long int otherok, char *errbuf, size_t errbuflen, char *varname) { long i = 0, neg = 1L; char *p = s, *errstr = NULL; removing_leading_and_trailing_white_space(p); for(; *p; p++) if(isdigit((unsigned char) *p)){ i = (i * 1...
false
false
false
false
false
0
trashlist_free(trashlist_t * root) { trashlist_t * p; trashlist_t * q; if (root == NULL) return; p = root->next; while (p != NULL) { q = p->next; free(p->ptr); free(p); p = q; } free(root); }
false
false
false
false
false
0
goUp() { const KUrl currentUrl = locationUrl(); const KUrl upUrl = currentUrl.upUrl(); if (upUrl != currentUrl) { setLocationUrl(upUrl); return true; } return false; }
false
false
false
false
false
0
print_new_gmail(JABBER_Conn *JConn, xmlnode x) { xmlnode y, z; char *subject, *snippet; JABBER_InstantMessage JIM; struct jabber_buddy JB; char *total_matched, *result_time; int new_mail; result_time = xmlnode_get_attrib(x, "result-time"); total_matched = xmlnode_get_attrib(x, "total-matched"); new_mail = str...
false
false
false
false
false
0
received_builder(struct sip_msg *msg, unsigned int *received_len) { char *buf, *tmp; int len, tmp_len; struct ip_addr *source_ip; source_ip=&msg->rcv.src_ip; buf=pkg_malloc(sizeof(char)*MAX_RECEIVED_SIZE); if (buf==0){ ser_error=E_OUT_OF_MEM; LM_ERR("out of pkg memory\n"); return 0; } memcpy(buf, RECEI...
false
false
false
false
false
0
copy_config_rom(__be32 *dest, const __be32 *src, size_t length) { size_t size = length * 4; memcpy(dest, src, size); if (size < CONFIG_ROM_SIZE) memset(&dest[length], 0, CONFIG_ROM_SIZE - size); }
false
true
false
false
false
1
QuickRasterSort() { if ( nbQRas <= 1 ) { return; } int cb = qrsData[firstQRas].bord; while ( cb >= 0 ) { int bI = qrsData[cb].ind; int nI = qrsData[bI].next; if ( nI < 0 ) { break; } int ncb = qrsData[nI].bord; i...
false
false
false
false
false
0
subst(sub_context_ty *scp, wstring_ty *s) { collect_ty buf; wchar_t c; wstring_ty *result; table_ty *tp; table_ty *the_end; int error_count; trace(("subst(scp = %p, s = %p)\n{\n", scp, s)); collect_constructor(&buf); sub_diversion(scp, s, ...
false
false
false
false
false
0
netsnmp_check_transaction_id(int transaction_id) { netsnmp_agent_session *asp; for (asp = agent_delegated_list; asp; asp = asp->next) { if (asp->pdu->transid == transaction_id) return SNMPERR_SUCCESS; } return SNMPERR_GENERR; }
false
false
false
false
false
0
ParseSwitchStatement(ZoneStringList* labels, bool* ok) { // SwitchStatement :: // 'switch' '(' Expression ')' '{' CaseClause* '}' SwitchStatement* statement = new(zone()) SwitchStatement(isolate(), labels); Target target(&this->target_stack_, statement); Expec...
false
false
false
false
false
0
TransferLongLong( const wxString & Name, wxLongLong_t & iValue, const wxLongLong_t & iDefault ) { if( mbStoreInClient ) { iValue = iDefault; if( ExchangeWithMaster( Name )) { iValue = wxAtoi( mValueString ); } } else { /// \todo Fix for long long values. mVa...
false
false
false
false
false
0
tp_dtmf_player_cancel (TpDTMFPlayer *self) { g_return_if_fail (TP_IS_DTMF_PLAYER (self)); if (self->priv->timer_id != 0) { tp_dtmf_player_maybe_emit_stopped_tone (self); tp_dtmf_player_emit_finished (self, TRUE); g_source_remove (self->priv->timer_id); self->priv->timer_id = 0; } ...
false
false
false
false
false
0
stf_parse_find_line (StfParseOptions_t *parseoptions, char const *data, int line) { while (line > 0) { int termlen = compare_terminator (data, parseoptions); if (termlen > 0) { data += termlen; line--; } else if (*data == 0) { return data; } else { data = g_utf8_next_char (data); } ...
false
false
false
false
false
0
detect_link_iff(void) { struct ifreq ifreq; set_ifreq_to_ifname(&ifreq); if (network_ioctl(SIOCGIFFLAGS, &ifreq, "SIOCGIFFLAGS") < 0) { return IFSTATUS_ERR; } /* If IFF_UP is not set (interface is down), IFF_RUNNING is never set * regardless of link status. Simply continue to report last status - * no poi...
false
false
false
false
false
0
e_kbd_buf_free(E_Kbd_Buf *kb) { e_kbd_buf_clear(kb); e_kbd_buf_layout_clear(kb); e_kbd_buf_lookup_cancel(kb); eina_stringshare_del(kb->sysdicts); if (kb->dict.sys) e_kbd_dict_free(kb->dict.sys); if (kb->dict.personal) e_kbd_dict_free(kb->dict.personal); if (kb->dict.data) e_kbd_dict_free(kb->dict.d...
false
false
false
false
false
0
signal_closure_free (SignalClosure *signal_closure) { g_weak_ref_set (&signal_closure->client_view, NULL); g_slist_free_full ( signal_closure->component_list, (GDestroyNotify) icalcomponent_free); g_slist_free_full ( signal_closure->component_id_list, (GDestroyNotify) e_cal_component_free_id); g_free (si...
false
false
false
false
false
0
hmat_check_closed(bound_t* m, size_t dim) { bool closed = true; size_t i,j,k; bound_t w; bound_init(w); for (i=0;i<2*dim;i++) for (j=0;j<2*dim;j++) for (k=0;k<2*dim;k++) { bound_add(w,m[matpos2(i,k)],m[matpos2(k,j)]); if (bound_cmp(m[matpos2(i,j)],w)>0) closed = false; } for (i=0;i<2*di...
false
false
false
false
false
0
eb_dispatch(XEvent *e, unsigned long mask) { if(e->type<0 || e->type>=LASTEvent || (!eventfunc[e->type]) || (!eventfunc[e->type](e))) cx_send_event(mask, e); }
false
false
false
false
false
0
global_vars_view_text_data_func (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *global_vars_model, GtkTreeIter *iter, gpointer user_data) { gchar *name = NULL, *text = NULL;...
false
false
false
false
false
0
get_fapi_glyph_metrics(FT_Incremental a_info, FT_UInt a_glyph_index, FT_Bool bVertical, FT_Incremental_MetricsRec * a_metrics) { /* FreeType will create synthetic vertical metrics, including a vertical * advance, if none is present. We don't want this, so if the fo...
false
false
false
false
false
0
videobuf_dvb_register_frontend(struct dvb_adapter *adapter, struct videobuf_dvb *dvb) { int result; /* register frontend */ result = dvb_register_frontend(adapter, dvb->frontend); if (result < 0) { printk(KERN_WARNING "%s: dvb_register_frontend failed (errno = %d)\n", dvb->name, result); goto fail_fr...
false
false
false
false
false
0
zoran_setup_videocodec(struct zoran *zr, int type) { struct videocodec_master *m = NULL; m = kmalloc(sizeof(struct videocodec_master), GFP_KERNEL); if (!m) { dprintk(1, KERN_ERR "%s: %s - no memory\n", ZR_DEVNAME(zr), __func__); return m; } /* magic and type are unused for master struct. Makes sens...
false
false
false
false
false
0
bpf_prog_put_rcu(struct bpf_prog *prog) { if (atomic_dec_and_test(&prog->aux->refcnt)) call_rcu(&prog->aux->rcu, __prog_put_common); }
false
false
false
false
false
0
EBC_NewKeyFileDialog_HandleValueChanged(GWEN_DIALOG *dlg, const char *sender) { if (strcasecmp(sender, "wiz_filename_edit")==0 || strcasecmp(sender, "wiz_bankcode_edit")==0 || strcasecmp(sender, "wiz_url_edit")==0 || strcasecmp(sender, "wiz_username_edit")==0 || strcasecmp(sender, "wiz_userid_...
false
false
false
false
false
0
ajNamResolve(AjPStr* name) { AjPStr varname = NULL; AjPStr varvalue = NULL; AjPStr restname = NULL; AjBool ret; if(!namNameExp) namNameExp = ajRegCompC("^\\$([A-Za-z0-9_]+)"); namUser("ajNamResolve of '%S'\n", *name); ret = ajRegExec(namNameExp, *name); if(ret) { ajRegSubI(nam...
false
false
false
false
false
0
ReferencesObjectFromElements(FixedArray* elements, ElementsKind kind, Object* object) { ASSERT(kind == FAST_ELEMENTS || kind == DICTIONARY_ELEMENTS); if (kind == FAST_ELEMENTS) { int length = IsJSArray() ? Smi::cast(...
false
false
false
false
false
0
ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk, const u32 *expkey) { unsigned int bsize = DES3_EDE_BLOCK_SIZE; unsigned int nbytes; int err; err = blkcipher_walk_virt(desc, walk); while ((nbytes = walk->nbytes)) { u8 *wsrc = walk->src.virt.addr; u8 *wdst = walk->dst.virt.addr; /...
false
false
false
false
false
0
ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync) { const struct ahc_syncrate *syncrate; if ((ahc->features & AHC_ULTRA2) != 0) scsirate &= SXFR_ULTRA2; else scsirate &= SXFR; /* now set maxsync based on card capabilities */ if ((ahc->features & AHC_DT) == 0 && maxsync < AHC_SYNCRATE_ULTR...
false
false
false
false
false
0
canvas_pop(t_canvas *x, t_floatarg fvis) { if (fvis != 0) canvas_vis(x, 1); pd_popsym(&x->gl_pd); canvas_resortinlets(x); canvas_resortoutlets(x); x->gl_loading = 0; }
false
false
false
false
false
0
xcf_file_init(char *filename) { char success = 1; char id[14]; int width; int height; int image_type; image->single_layer_index = -1; image->file = f_open(filename); D("image->file = %p\n", image->file); if (!image->file) return 0; image->filename = filename; image->layers = NULL; ...
false
false
false
false
false
0
proto (int sock, const char *hostname, const char *service) { krb5_auth_context auth_context; krb5_error_code status; krb5_principal server; krb5_data data; krb5_data packet; uint32_t len, net_len; status = krb5_auth_con_init (context, &auth_context); if (status) krb5_err (context, 1, ...
false
false
false
false
false
0
lastlayerspec(struct FlattenSpec *spec,const char *option) { if( spec->numLayers == 0 ) FatalGeneric(20,_("The %s option must follow a layer name on the " "command line"),option); return spec->layers + (spec->numLayers-1) ; }
false
false
false
false
false
0
write(hsStream* S) { if (S->getVer().isValid()) setVer(S->getVer()); if (!getVer().isSafeVer()) setVer(PlasmaVer::GetSafestVersion(getVer())); if (S->getVer().isUniversal()) { S->writeByte(fState); S->writeInt(fSeqPrefix); S->writeInt(fPageNum); S->writeShor...
false
false
false
false
false
0
obt_xml_register(ObtXmlInst *i, const gchar *tag, ObtXmlCallback func, gpointer data) { struct Callback *c; if (g_hash_table_lookup(i->callbacks, tag)) { g_error("Tag '%s' already registered", tag); return; } c = g_slice_new(struct Callback); c->tag = g_strdup...
false
false
false
false
false
0
slot_rmap_walk_next(struct slot_rmap_walk_iterator *iterator) { if (++iterator->rmap <= iterator->end_rmap) { iterator->gfn += (1UL << KVM_HPAGE_GFN_SHIFT(iterator->level)); return; } if (++iterator->level > iterator->end_level) { iterator->rmap = NULL; return; } rmap_walk_init_level(iterator, iterator->...
false
false
false
false
false
0
processInner(ProcessContext &context) { if (!context.inTable()) { // FIXME location context.vm().interp->message(InterpreterMessages::tableRowOutsideTable); CompoundFlowObj::processInner(context); return; } if (context.inTableRow()) context.endTableRow(); context.startTable...
false
false
false
false
false
0
ctpl_input_stream_unref (CtplInputStream *stream) { if (g_atomic_int_dec_and_test (&stream->ref_count)) { g_free (stream->name); stream->buf_pos = stream->buf_size; stream->buf_size = 0U; g_free (stream->buffer); g_object_unref (stream->stream); g_slice_free1 (sizeof *stream, stream); } }
false
false
false
false
false
0
quitPressed(void *packet) { Local *l = packet; AbutMsgOpt buttons[2]; assert(MAGIC(l)); if (l->modified) { buttons[0].name = msg_noCancel; buttons[0].callback = dontQuit; buttons[0].packet = l; buttons[0].keyEq = NULL; buttons[1].name = msg_yesQuit; buttons[1].callback = reallyQuit;...
false
false
false
false
false
0
bgav_options_set_postprocessing_level(bgav_options_t* opt, float pp_level) { opt->pp_level = pp_level; if(opt->pp_level < 0.0) opt->pp_level = 0.0; if(opt->pp_level > 1.0) opt->pp_level = 1.0; }
false
false
false
false
false
0
getModRefInfo(Instruction *I, ImmutableCallSite Call) { // We may have two calls if (auto CS = ImmutableCallSite(I)) { // Check if the two calls modify the same memory return getModRefInfo(Call, CS); } else { // Otherwise, check if the call modifies or references the // location this memory access...
false
false
false
false
false
0
write(pl_wchar_t* dest) { plString::Wide wsbuf = fFilename.wstr(); memcpy(dest, wsbuf.data(), wsbuf.len() * sizeof(pl_wchar_t)); dest[wsbuf.len()] = 0; dest += (wsbuf.len() + 1); wsbuf = fDownloadName.wstr(); memcpy(dest, wsbuf.data(), wsbuf.len() * sizeof(pl_wchar_t)); dest[wsbuf.len()] = ...
false
false
false
false
false
0
AddEdgeToRing( int nVertToAdd, double * padfXToAdd, double * padfYToAdd, double * padfZToAdd, int bReverse, int bDropVertex ) { int iStart=0, iEnd=nVertToAdd-1, iS...
false
false
false
false
false
0
p_update_point_index_text(t_mov_gui_stuff *mgp) { g_snprintf (&mgp->point_index_text[0], POINT_INDEX_LABEL_LENGTH, _("Current Point: [ %3d ] of [ %3d ]"), pvals->point_idx + 1, pvals->point_idx_max +1); if (mgp->point_index_frame) { gtk_frame_set_label (GTK_FRAME (mgp->point_i...
false
false
false
false
false
0
shutdown_thread_fn(void* arg) { OMNIORB_ASSERT(arg); omniORB::logs(15, "ORB shutdown thread started."); omni_tracedmutex_lock sync(orb_lock); ((omniOrbORB*) arg)->actual_shutdown(); }
false
false
false
false
false
0
procargs(char **argv) { int i; const char *xminusc; char **xargv; xargv = argv; arg0 = xargv[0]; /* if (xargv[0]) - mmm, this is always true! */ xargv++; for (i = 0; i < NOPTS; i++) optlist[i] = 2; argptr = xargv; if (options(1)) { /* it already printed err message */ raise_exception(EXERROR); } xar...
false
false
false
false
false
0
setdevname(cp, quiet) char *cp; int quiet; { struct stat statbuf; char dev[MAXPATHLEN]; if (*cp == 0) return 0; if (strncmp("/dev/", cp, 5) != 0) { strcpy(dev, "/dev/"); strncat(dev, cp, MAXPATHLEN - 5); dev[MAXPATHLEN-1] = 0; cp = dev; } /* * Check if there is a device by t...
false
false
false
false
false
0
HandleError(QAbstractSocket::SocketError) { QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender()); if(socket == 0) { qCritical() << "HandleError signal received a non-socket"; return; } HandleSocketClose(socket, socket->errorString()); }
false
false
false
false
false
0
nvkm_perfctr_new(struct nvkm_perfdom *dom, int slot, u8 domain, struct nvkm_perfsig *signal[4], u64 source[4][8], u16 logic_op, struct nvkm_perfctr **pctr) { struct nvkm_perfctr *ctr; int i, j; if (!dom) return -EINVAL; ctr = *pctr = kzalloc(sizeof(*ctr), GFP_KERNEL); if (!ctr) return -ENOMEM; ctr->d...
false
false
false
false
false
0
kgdb_correct_hw_break(void) { int breakno; for (breakno = 0; breakno < HBP_NUM; breakno++) { struct perf_event *bp; struct arch_hw_breakpoint *info; int val; int cpu = raw_smp_processor_id(); if (!breakinfo[breakno].enabled) continue; if (dbg_is_early) { set_debugreg(breakinfo[breakno].addr, breakn...
false
false
false
false
false
0
pause(void) { struct termios old; // structure containing old terminal information struct termios new; // structure containing new terminal information FILE * tty; // pointer to the tty input device char current_character; // the last key pressed if (proc_info.dont_wait) { err("Backg...
false
false
false
false
true
1
ajSysFileRmrfC(const char *path) { AjPList flist = NULL; AjPStr wild = NULL; AjPStr fname = NULL; AjPStr dirpath = NULL; const char *pdir = NULL; AjBool ret; if(ajCharMatchC(path,".") || ajCharMatchC(path,"..")) return ajFalse; flist = ajListNew(); wild = ajS...
false
false
false
false
false
0
efreet_menu_layout_desktop(Efreet_Menu_Desktop *md) { Efreet_Menu *entry; /* init entry */ entry = efreet_menu_entry_new(); entry->type = EFREET_MENU_ENTRY_DESKTOP; entry->id = eina_stringshare_add(md->id); entry->name = eina_stringshare_add(md->desktop->name); if (md->desktop->icon) entry-...
false
false
false
false
false
0
read_cp949(charset_spec const *charset, long int input_chr, charset_state *state, void (*emit)(void *ctx, long int output), void *emitctx) { UNUSEDARG(charset); /* * For reading CP949, state->s0 simply contains the single * stored lead byte when we are half way through a double-byte...
false
false
false
false
false
0
dbi_driver_get_description(dbi_driver Driver) { dbi_driver_t *driver = Driver; if (!driver) return my_ERROR; return driver->info->description; }
false
false
false
false
false
0
rebuild_regno_allocno_maps (void) { unsigned int l; int max_regno, regno; ira_allocno_t a; ira_loop_tree_node_t loop_tree_node; loop_p loop; ira_allocno_iterator ai; ira_assert (current_loops != NULL); max_regno = max_reg_num (); FOR_EACH_VEC_ELT (loop_p, ira_loops.larray, l, loop) if (ira_loop_n...
false
false
false
false
false
0
make_dacs_acs_attr_string(void) { Crypt_keys *ck; Ds ds; Jurisdiction *j; ds_init(&ds); ds_asprintf(&ds, "fed_name=\"%s\"", conf_val(CONF_FEDERATION_NAME)); ds_asprintf(&ds, " fed_domain=\"%s\"", conf_val(CONF_FEDERATION_DOMAIN)); if ((ck = crypt_keys_from_vfs(ITEM_TYPE_FEDERATION_KEYS)) != NULL) { if (...
false
false
false
false
false
0
intel_mst_enable_dp(struct intel_encoder *encoder) { struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); struct intel_digital_port *intel_dig_port = intel_mst->primary; struct intel_dp *intel_dp = &intel_dig_port->dp; struct drm_device *dev = intel_dig_port->base.base.dev; struct drm_i915_private ...
false
false
false
false
false
0
tokenize( const char* input ) { vector< string > token; bool betweenWords = true; int start=0; int i=0; for(; input[i] != '\0'; i++) { bool isSpace = (input[i] == ' ' || input[i] == '\t'); if (!isSpace && betweenWords) { start = i; betweenWords = false; } else if (isSpace && !betweenWords) { token....
false
false
false
false
false
0
deleteRequest(Job& job, FaxRequest* req, JobStatus why, bool force, const char* duration) { deleteRequest(job, *req, why, force, duration); delete req; }
false
false
false
false
false
0
set_fields(lua_State *L, int index, const table_field *fields) { for (int i = 0; fields[i].name; i++) { table_field f = fields[i]; switch (f.value == NULL ? LUA_TNIL : f.type) { case LUA_TFUNCTION: lua_pushcfunction(L, (lua_CFunction) f.value); break; ...
false
false
false
false
false
0
SetBorderColour( const wxColour &colour ) { wxCHECK_RET(colour.Ok(), wxT("invalid colour")); m_borderColour = colour; Redraw(wxPLOT_REDRAW_PLOT); }
false
false
false
false
false
0
_send_slurmd_conf_lite (int fd, slurmd_conf_t *cf) { int len; Buf buffer = init_buf(0); pack_slurmd_conf_lite(cf, buffer); len = get_buf_offset(buffer); safe_write(fd, &len, sizeof(int)); safe_write(fd, get_buf_data(buffer), len); free_buf(buffer); return (0); rwfail: return (-1); }
false
false
false
false
false
0
gwy_tool_sfunctions_response(GwyTool *tool, gint response_id) { GWY_TOOL_CLASS(gwy_tool_sfunctions_parent_class)->response(tool, response_id); if (response_id == GTK_RESPONSE_APPLY) gwy_tool_sfunctions_apply(G...
false
false
false
false
false
0
write_var_size(GF_BitStream *bs, u32 size) { unsigned char vals[4]; u32 length = size; vals[3] = (unsigned char) (length & 0x7f); length >>= 7; vals[2] = (unsigned char) ((length & 0x7f) | 0x80); length >>= 7; vals[1] = (unsigned char) ((length & 0x7f) | 0x80); length >>= 7; vals[0] = (unsigned char) ((length & ...
false
false
false
false
false
0
led_invert_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct led_classdev *led_cdev = dev_get_drvdata(dev); struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; unsigned long state; int ret; ret = kstrtoul(buf, 0, &state); if (ret) return ret; h...
false
false
false
false
false
0
_scsih_probe_raid(struct MPT3SAS_ADAPTER *ioc) { struct _raid_device *raid_device, *raid_next; int rc; list_for_each_entry_safe(raid_device, raid_next, &ioc->raid_device_list, list) { if (raid_device->starget) continue; rc = scsi_add_device(ioc->shost, RAID_CHANNEL, raid_device->id, 0); if (rc) ...
false
false
false
false
false
0
m_yday(union DateData *x) { int jd, ry, rd; double sg; jd = m_local_jd(x); sg = m_virtual_sg(x); /* !=m_sg() */ if (m_proleptic_gregorian_p(x) || (jd - sg) > 366) return c_gregorian_to_yday(m_year(x), m_mon(x), m_mday(x)); if (m_proleptic_julian_p(x)) return c_julian_to_yday(m_year(x), m_mo...
false
false
false
false
false
0
postRun() { Q_ASSERT(engine); Q_ASSERT(d->theConsole); d->theConsole->setQtLuaEngine(0); d->theConsole->drainOutput(); d->theEngine = 0; delete engine; engine = 0; if (! d->closingDown) { fflush(stdout); fflush(stderr); fprintf(stderr,"\n------------ restarting lua ------------\n\n...
false
false
false
false
false
0
trim_right(char *str) { int len; if (str == NULL) return NULL; len = strlen(str); while (len) { if (*(str + len - 1) == ' ') { *(str + len - 1) = '\0'; } else { break; } len--; } return str; }
false
false
false
false
false
0
OGRSQLiteIOWrite(sqlite3_file* pFile, const void* pBuffer, int iAmt, sqlite3_int64 iOfst) { OGRSQLiteFileStruct* pMyFile = (OGRSQLiteFileStruct*) pFile; VSIFSeekL(pMyFile->fp, (vsi_l_offset) iOfst, SEEK_SET); int nWritten = (int)VSIFWriteL(pBuffer, 1, iAmt, pMyFile->fp); #ifdef DEBUG_IO CPLDebug("SQLITE...
false
false
false
false
false
0
count_map(jk_uri_worker_map_t *uw_map, const char *worker, jk_logger_t *l) { unsigned int i; int count=0; JK_TRACE_ENTER(l); if (uw_map) { for (i = 0; i < uw_map->size[uw_map->index]; i++) { uri_worker_record_t *uwr = uw_map->maps[uw_map->...
false
false
false
false
false
0
render(Request* request) // Show a list of history // PRE: User should be valid otherwise output error { // Fetch a user requested User* user = Users::fetchUser(request->get("user_id")); if (!user) { // User not found cerr << "ERROR: History:: " << "Sorry, we couldn't find the user [" ...
false
false
false
false
false
0
get_selected_files (DialogData *data) { GList *selection = NULL; GtkTreeIter iter; if (! gtk_tree_model_get_iter_first (data->list_model, &iter)) return NULL; do { gboolean is_selected; OpenFile *file; gtk_tree_model_get (data->list_model, &iter, IS_SELECTED_CO...
false
false
false
false
false
0
uaeserialdev_startup (uaecptr resaddr) { if (!currprefs.uaeserial) return resaddr; if (log_uaeserial) write_log (_T("uaeserialdev_startup(0x%x)\n"), resaddr); /* Build a struct Resident. This will set up and initialize * the serial.device */ put_word (resaddr + 0x0, 0x4AFC); put_long (resaddr + 0x2, resaddr);...
false
false
false
false
false
0