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
clutter_event_check (GSource *source) { ClutterEventSource *event_source = (ClutterEventSource *) source; ClutterBackendX11 *backend = event_source->backend; gboolean retval; _clutter_threads_acquire_lock (); if (event_source->event_poll_fd.revents & G_IO_IN) retval = (clutter_events_pending () || XPend...
false
false
false
false
false
0
getifconfig() { int rtn; int raw_sock; if ((raw_sock = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) == -1) { perror("open packet socket"); return FALSE; } memset(ifreq, 0, sizeof(ifreq)); ifconf.ifc_len = sizeof(ifreq); ifconf.ifc_req = ifreq; rtn = ioctl(raw_sock, SIOCGIFCONF, &ifconf); close(raw_so...
false
false
false
false
false
0
gv_cleanup_node(node_t * n) { if (ND_pos(n)) free(ND_pos(n)); if (ND_shape(n)) ND_shape(n)->fns->freefn(n); free_label(ND_label(n)); free_label(ND_xlabel(n)); /*FIX HERE , shallow cleaning may not be enough here */ agdelrec(n, "Agnodeinfo_t"); }
false
false
false
false
false
0
streamOpenRead(const char *filenames) { int filetype, byteorder; int streamID; int num_fnames = 0; char *fnames[MAX_FNAMES]; const char *filename; stream_t *streamptr = NULL; cdiInitialize(); //num_fnames = get_fnames(filenames, fnames, MAX_FNAMES); if ( num_fnames == 0 ) filename = filenames; ...
false
false
false
false
true
1
func_spherical_coords(const CArrayDouble<7+3> &x, const double &dummy, CArrayDouble<3> &Y) { MRPT_UNUSED_PARAM(dummy); CPose3DQuat q(x[0],x[1],x[2],CQuaternionDouble(x[3],x[4],x[5],x[6])); q.quat().normalize(); const TPoint3D p(x[7+0],x[7+1],x[7+2]); q.sphericalCoordinates(p,Y[0],Y[1],Y[2]); }
false
false
false
false
false
0
ifopen ( struct net_device *netdev ) { int rc; if ( ( rc = netdev_open ( netdev ) ) != 0 ) { printf ( "Could not open %s: %s\n", netdev->name, strerror ( rc ) ); return rc; } return 0; }
false
false
false
false
false
0
bcm63xx_hsspi_setup(struct spi_device *spi) { struct bcm63xx_hsspi *bs = spi_master_get_devdata(spi->master); u32 reg; reg = __raw_readl(bs->regs + HSSPI_PROFILE_SIGNAL_CTRL_REG(spi->chip_select)); reg &= ~(SIGNAL_CTRL_LAUNCH_RISING | SIGNAL_CTRL_LATCH_RISING); if (spi->mode & SPI_CPHA) reg |= SIGNAL_CTRL_...
false
false
false
false
false
0
hcb_prep(const struct sess *sp) { struct hcb_y *y; if (sp->wrk->nhashpriv == NULL) { ALLOC_OBJ(y, HCB_Y_MAGIC); sp->wrk->nhashpriv = y; } }
false
false
false
false
false
0
SetListings(CComparableListing* pLeft, CComparableListing* pRight) { wxASSERT((pLeft && pRight) || (!pLeft && !pRight)); if (IsComparing()) ExitComparisonMode(); if (m_pLeft) m_pLeft->SetOther(0); if (m_pRight) m_pRight->SetOther(0); m_pLeft = pLeft; m_pRight = pRight; if (m_pLeft) m_pLeft->SetOther(...
false
false
false
false
false
0
XGINew_GetXG27Sense(struct vb_device_info *pVBInfo) { unsigned char Temp, bCR4A; bCR4A = xgifb_reg_get(pVBInfo->P3d4, 0x4A); /* Enable GPIOA/B/C read */ xgifb_reg_and_or(pVBInfo->P3d4, 0x4A, ~0x07, 0x07); Temp = xgifb_reg_get(pVBInfo->P3d4, 0x48) & 0x07; xgifb_reg_set(pVBInfo->P3d4, 0x4A, bCR4A); if (Temp <= ...
false
false
false
false
false
0
pgstat_report_stat(bool force) { /* we assume this inits to all zeroes: */ static const PgStat_TableCounts all_zeroes; static TimestampTz last_report = 0; TimestampTz now; PgStat_MsgTabstat regular_msg; PgStat_MsgTabstat shared_msg; TabStatusArray *tsa; int i; /* Don't expend a clock check if nothing to do...
false
false
false
false
false
0
Gvl_load_colors_data(void **color_data, const char *name) { const char *mapset; struct Colors *colors; if (NULL == (mapset = G_find_grid3(name, ""))) { G_warning(_("3D raster map <%s> not found"), name); return (-1); } if (NULL == (colors = (struct Colors *)G_malloc(sizeof(struct Colors)))) ret...
false
false
false
false
false
0
getsubunits(FILE *myfile, tconvdata convdata, tmapdata mapdata, int xpos, int ypos, unsigned char type, int player, unsigned char index, int *unit_id) // gets and writes the units inside other buildings or units { int i,j; for ( i=0 ; i < mapdata.numbuildings ; i++ ) { if( ( mapdata.buildings[i].ty...
false
false
false
false
false
0
_e_fm_main_udisks_vol_mount_timeout(E_Volume *v) { DBusError error; char *buf; int size; v->guard = NULL; if (!dbus_pending_call_get_completed(v->op)) dbus_pending_call_cancel(v->op); v->op = NULL; v->optype = E_VOLUME_OP_TYPE_NONE; error.name = "org.enlightenment.fm2.MountTimeout"; err...
false
false
false
false
false
0
InitHistory(XmtCliWidget w) #else static void InitHistory(w) XmtCliWidget w; #endif { w->cli.history_num_items = 0; w->cli.historypos = -1; if (w->cli.history_max_items == 0) w->cli.history = NULL; else w->cli.history = (String *) XtMalloc(w->cli.history_max_items * sizeof(String)); }
false
false
false
false
false
0
unique_initialize() { int rc; /* statically declared just after the #includes at top */ memset (&unique, 0, sizeof(unique)); unique.on_bi.bi_type = "unique"; unique.on_bi.bi_db_init = unique_db_init; unique.on_bi.bi_db_destroy = unique_db_destroy; unique.on_bi.bi_db_open = unique_open; unique.on_bi.bi_db_clos...
false
false
false
false
false
0
print_error_buffers(struct drm_i915_error_state_buf *m, const char *name, struct drm_i915_error_buffer *err, int count) { int i; err_printf(m, " %s [%d]:\n", name, count); while (count--) { err_printf(m, " %08x_%08x %8u %02x %02x [ ", upper_32_bits(err->gtt_offset), lower_32_bits(err-...
false
false
false
false
false
0
GTFstarGTF(GTF* left,GTF* right) { int i,j; gdouble sum[3]; gdouble t; gdouble PA[3]; gdouble PB[3]; gdouble gama=left->Ex+right->Ex; gdouble R2=0.0; gdouble c = 0; for(j=0;j<3;j++) { t=(left->Ex*left->C[j]+right->Ex*right->C[j])/gama; PA[j]=left->C[j]-t; PB[j]=right->C[j]-t; R2 += (left->C[j]-right-...
false
false
false
false
false
0
kill_allchildren() { #ifdef DGDEBUG std::cout << "killing all childs:" << std::endl; #endif for (int i = o.max_children - 1; i >= 0; i--) { if (childrenstates[i] >= 0) { kill(childrenpids[i], SIGTERM); childrenstates[i] = -2; // dieing numchildren--; delete childsockets[i]; childsockets[i] = NULL; ...
false
false
false
false
false
0
mk_writeFloat(mk_Context *c, unsigned id, float f) { CHECK(mk_writeID(c, id)); CHECK(mk_writeSize(c, 4)); CHECK(mk_writeFloatRaw(c, f)); return 0; }
false
false
false
false
false
0
get_execd_topology(char** topology, int* length) { bool success = false; /* topology must be a NULL pointer */ if (topology != NULL && (*topology) == NULL) { #if defined(PLPA_LINUX) if (get_topology_linux(topology, length) == true) { success = true; } else { success = false; ...
false
false
false
false
false
0
toggleSidebar() { QIcon icon; m_sidebarEnabled = !m_sidebarEnabled; if ( !m_sidebarEnabled ) { icon = IconShack::instance().GetGoodUserIconExpanded( The::currentUser().icon() ); #ifndef Q_WS_MAC centralWidget()->setContentsMargins( 5, 0, 5, 0 ); //aesthetics #endif } ...
false
false
false
false
false
0
sqlite3ExprFunction(ExprList *pList, Token *pToken){ Expr *pNew; assert( pToken ); pNew = sqliteMalloc( sizeof(Expr) ); if( pNew==0 ){ sqlite3ExprListDelete(pList); /* Avoid leaking memory when malloc fails */ return 0; } pNew->op = TK_FUNCTION; pNew->pList = pList; assert( pToken->dyn==0 ); p...
false
false
false
false
false
0
SocketReady(fd_set *rfdp, fd_set *wfdp, int *nfds, fd_set *rfdnextp, fd_set *wfdnextp) { if( T_FREE == m_status ) return 0; if( T_CONNECTING == m_status && FD_ISSET(m_sock,wfdp) ){ int error = 0; socklen_t n = sizeof(error); (*nfds)--; FD_CLR(m_sock, wfdnextp); if( FD_ISSET(m_sock, rfdp) ){ ...
false
false
false
false
false
0
print_formula_h(const Expr& clause, std::ostream& s){ int val = d_print_map[clause]; if( val!=0 ){ s << "@f" << val; }else if(clause.isNot()){ s<<"(not "; print_formula_h(clause[0],s); s<<")"; }else if(clause.isOr()){ s<<"(or "; print_formula_h(clause[0],s); s << " "; print_formu...
false
false
false
false
false
0
gl_mini_preview_set_template (glMiniPreview *this, const lglTemplate *template) { const lglTemplateFrame *frame; lglTemplateOrigin *origins; gdouble w, h; gint i; gl_debug (DEBUG_MINI_PREVIEW, ...
false
false
false
false
false
0
set_dbmfile(cmd_parms *cmd, void *dconf, const char *arg) { express_server_conf *sconf; sconf = ap_get_module_config(cmd->server->module_config, &proxy_express_module); if ((sconf->dbmfile = ap_server_root_relative(cmd->pool, arg)) == NULL) { ...
false
false
false
false
false
0
dec_const_short(Operand *opt, int value_sh) { Const_table *cpt = NULL; if (opt != NULL) { cpt = alloc_const_table(); if (DEBUG_SW > 9) fprintf(stderr, "%d\n", opt->entry); cpt->entry = opt->entry; cpt->type = TYPE_SHORT; cpt->val.sh = value_sh; } free_operand(opt); return cpt; }
false
false
false
false
false
0
PromoteMemToReg(const std::vector<AllocaInst*> &Allocas, DominatorTree &DT, DominanceFrontier &DF, AliasSetTracker *AST) { // If there is nothing to do, bail out... if (Allocas.empty()) return; PromoteMem2Reg(Allocas, DT, DF, AST).run(); }
false
false
false
false
false
0
checkSlaveOnHold(bool b) { kDebug(7006) << b; m_checkOnHold = b; }
false
false
false
false
false
0
gst_pool_source_dispatch (GSource * source, GSourceFunc callback, gpointer user_data) { gboolean res; GstPoolSource *psrc = (GstPoolSource *) source; GstRTSPSessionPoolFunc func = (GstRTSPSessionPoolFunc) callback; GST_INFO ("dispatch"); if (func) res = func (psrc->pool, user_data); else res =...
false
false
false
false
false
0
dio_ReadString(void) { char * Res = (char *)(sData + sDataPos); U4_T Length = 0; while (dio_ReadU1() != 0) Length++; if (Length == 0) return NULL; return Res; }
false
false
false
false
false
0
getLong() /*const*/ { if (fCount == fDecimalAt) { int32_t value; fDigits[fCount] = 0; // NULL terminate // This conversion is bad on 64-bit platforms when we want to // be able to return a 64-bit number [grhoten] *fDecimalDigits = fIsPositive ? '+' : '-'; value =...
false
false
false
false
false
0
delete_one_grid() { gint j; gint k = rowSelected; if(k<0 || k >= animationGrids.numberOfFiles) return; if(!animationGrids.geometries) return; if(animationGrids.numberOfFiles==1) { freeAnimationGrids(); rafreshList(); return; } if(animationGrids.geometries) if(animationGrids.geometries[k].listOfAtoms...
false
false
false
false
false
0
do_color(char *buff) { char in_color[64]; int R, G, B, color = 0; if (1 != sscanf(buff, "%*s %s", in_color)) { G_warning(_("Unable to read color")); return (-1); } /* Parse and select color */ color = G_str_to_color(in_color, &R, &G, &B); if (color == 0) { G_warning(_("[%s]: No such col...
true
true
false
false
true
1
sht15_connection_reset(struct sht15_data *data) { int i, err; err = gpio_direction_output(data->pdata->gpio_data, 1); if (err) return err; ndelay(SHT15_TSCKL); gpio_set_value(data->pdata->gpio_sck, 0); ndelay(SHT15_TSCKL); for (i = 0; i < 9; ++i) { gpio_set_value(data->pdata->gpio_sck, 1); ndelay(SHT15_TS...
false
false
false
false
false
0
follow(unsigned int v) { unsigned int p; if (v == line) return; p = parent[v]; switch(name[p]) { case STAR: case PLUS: cstate(v); follow(p); return; case OR: case QUEST: follow(p); return; case CAT: if (v == left[p]) { if (cstate(right[p]) == 0) { follow(p); return;...
false
false
false
false
false
0
luaC_runtilstate (lua_State *L, int statesmask) { global_State *g = G(L); while (!testbit(statesmask, g->gcstate)) singlestep(L); }
false
false
false
false
false
0
sl2vl_dump_table_entry(ib_portid_t * dest, int in, int out) { char buf[2048]; char data[IB_SMP_DATA_SIZE] = { 0 }; int portnum = (in << 8) | out; if (!smp_query_via(data, dest, IB_ATTR_SLVL_TABLE, portnum, 0, srcport)) return "slvl query failed"; mad_dump_sltovl(buf, sizeof buf, data, sizeof data); printf("po...
false
false
false
false
false
0
distmin(int x0, int y0, int x1, int y1) /* distance between two points, in moves */ { register int dx = x0 - x1, dy = y0 - y1; if (dx < 0) { dx = -dx; } if (dy < 0) { dy = -dy; } /* The minimum number of moves to get from (x0,y0) to (x1,y1) is the : larger of th...
false
false
false
false
false
0
FcTypecheckValue (FcConfigParse *parse, FcType value, FcType type) { if (value == FcTypeInteger) value = FcTypeDouble; if (type == FcTypeInteger) type = FcTypeDouble; if (value != type) { if ((value == FcTypeLangSet && type == FcTypeString) || (value == FcTypeString && type == FcTypeLangSet)) ...
false
false
false
false
false
0
gmm_log_10 (double x) { double y; errno = 0; y = log(fabs(x)); if (errno) { y = NADBL; } else { y /= log(10.0); } return y; }
false
false
false
false
false
0
file(const QString& name) { TraceFile& f = _fileMap[name]; if (!f.data()) { // was created f.setPosition(this); f.setName(name); #if TRACE_DEBUG qDebug("Created %s [TraceData::file]", qPrintable(f.fullName())); #endif } return &f; }
false
false
false
false
false
0
gcr_combo_selector_get_selected (GcrComboSelector *self) { GtkTreeIter iter; g_return_val_if_fail (GCR_IS_COMBO_SELECTOR (self), NULL); gtk_combo_box_get_active_iter (GTK_COMBO_BOX (self), &iter); return gcr_collection_model_object_for_iter (self->pv->model, &iter); }
false
false
false
false
false
0
rd_Z(Uint *n, int w, ftnlen len) #endif { long x[9]; char *s, *s0, *s1, *se, *t; Const char *sc; int ch, i, w1, w2; static char hex[256]; static int one = 1; int bad = 0; if (!hex['0']) { sc = "0123456789"; while(ch = *sc++) hex[ch] = ch - '0' + 1; sc = "ABCDEF"; while(ch = *sc++) hex[ch] = hex[c...
false
false
false
false
false
0
gf_cli3_1_deprobe_cbk (struct rpc_req *req, struct iovec *iov, int count, void *myframe) { gf1_cli_deprobe_rsp rsp = {0,}; int ret = -1; if (-1 == req->rpc_status) { goto out; } ret = xdr_to_generic (*iov, &rsp, (x...
false
false
false
false
false
0
setDelayedSignals(bool state) { d_qble->_delayed = state; d_qble->_timer->stop(); if (state) { blockSignals(true); connect(d_qble->_timer, SIGNAL(timeout()), this, SLOT(emitTextChangedSignal())); } else { blockSignals(false); disconnect(d_qble->_timer, SIGNAL(timeout()), ...
false
false
false
false
false
0
git_status_pane_set_selected_column_state (GitStatusPane *self, StatusType type, gboolean state) { GtkTreeModel *status_model; GtkTreePath *section; GtkTreeIter parent_iter; gint i; GtkTreeIter iter; gchar *path; AnjutaVcsSta...
false
false
false
false
false
0
vi_get_xclk(struct amdgpu_device *adev) { u32 reference_clock = adev->clock.spll.reference_freq; u32 tmp; if (adev->flags & AMD_IS_APU) return reference_clock; tmp = RREG32_SMC(ixCG_CLKPIN_CNTL_2); if (REG_GET_FIELD(tmp, CG_CLKPIN_CNTL_2, MUX_TCLK_TO_XCLK)) return 1000; tmp = RREG32_SMC(ixCG_CLKPIN_CNTL); ...
false
false
false
false
false
0
pdf_read_xref(pdf_document *xref, int ofs, pdf_lexbuf *buf) { int c; fz_context *ctx = xref->ctx; pdf_obj *trailer; fz_seek(xref->file, ofs, 0); while (iswhite(fz_peek_byte(xref->file))) fz_read_byte(xref->file); fz_try(ctx) { c = fz_peek_byte(xref->file); if (c == 'x') trailer = pdf_read_old_xref(xr...
false
false
false
false
false
0
find_or_add_userhost(const char *host) { struct UserHost *userhost; if ((userhost = hash_find_userhost(host)) != NULL) return userhost; userhost = BlockHeapAlloc(userhost_heap); strlcpy(userhost->host, host, sizeof(userhost->host)); hash_add_userhost(userhost); return userhost; }
false
false
false
false
false
0
get_boxable_mono_type (VerifyContext* ctx, int token, const char *opcode) { MonoType *type; MonoClass *klass; if (!(type = verifier_load_type (ctx, token, opcode))) return NULL; if (type->byref && type->type != MONO_TYPE_TYPEDBYREF) { ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Invalid use of byref type for %s a...
false
false
false
true
false
1
resolve() const { vector<AlignReference*> v = select<AlignReference>(); vector<FoliaElement*> result; for ( size_t i=0; i < v.size(); ++i ){ result.push_back( v[i]->resolve( this ) ); } return result; }
false
false
false
false
false
0
mx_entry_store_undo_on_keypress (ClutterText *text, ClutterKeyEvent *event, MxEntry *entry) { if (event->keyval == CLUTTER_KEY_space) { /* store the text immediately */ if (entry->priv->undo_timeout_source) { ...
false
false
false
false
false
0
s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c) { #if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD) mp_digit d = 0; /* Inner product: Digits of a */ while (a_len--) { mp_word w = ((mp_word)b * *a++) + *c + d; *c++ = ACCUM(w); d = CARRYOUT(w); } while (d) ...
false
false
false
false
false
0
po_reset (struct event_set *es) { struct po_set *pos = (struct po_set *) es; ASSERT (pos->fast); pos->n_events = 0; }
false
false
false
false
false
0
xreaddir(DIR *dp) { struct dirent *d; while ((d = readdir(dp))) { if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, "..")) continue; /* blacklist here? */ break; } return d; }
false
false
false
false
false
0
ima_show_template_data_ascii(struct seq_file *m, enum ima_show_type show, enum data_formats datafmt, struct ima_field_data *field_data) { u8 *buf_ptr = field_data->data; u32 buflen = field_data->len; switch (datafmt) { case DATA_FMT_DIGEST_WITH_ALGO: buf_ptr = strnchr(field_data->data, buflen, ...
false
false
false
false
false
0
reverse_tokens(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { decode_ctx ctx; yajl_parser_config conf = {0, 1}; // No comments, check utf8 yajl_handle handle = yajl_alloc(&decoder_callbacks, &conf, NULL, &ctx); yajl_status status; unsigned int used; ErlNifBinary bin; ERL_NIF_TERM ret...
false
false
false
false
false
0
skip_to_eol(int c, gnc_t gnc, void *closure) { while(c != '\n' && c >= 0) c = gnc(closure); if(c == '\n') c = gnc(closure); return c; }
false
false
false
false
false
0
m_undo(GtkWidget *, cchar *) { if (CEF) { // undo active edit edit_undo(); // v.11.08 return; } if (Pundo == 0) return; // undo pa...
false
false
false
false
false
0
kvm_flush_pml_buffers(struct kvm *kvm) { int i; struct kvm_vcpu *vcpu; /* * We only need to kick vcpu out of guest mode here, as PML buffer * is flushed at beginning of all VMEXITs, and it's obvious that only * vcpus running in guest are possible to have unflushed GPAs in PML * buffer. */ kvm_for_each_vcp...
false
false
false
false
false
0
ocfs2_attach_refcount_tree(struct inode *inode, struct buffer_head *di_bh) { int ret, data_changed = 0; struct buffer_head *ref_root_bh = NULL; struct ocfs2_inode_info *oi = OCFS2_I(inode); struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); s...
false
false
false
false
false
0
encrypt(char x, int a, int b) { if( x < 'A' || (x > 'Z' && x < 'a') || x > 'z' ) return x; int oset = x <= 'Z' ? 'A' : 'a'; return (a * (x - oset) + b) % 26 + oset; }
false
false
false
false
false
0
GetConstructorDelegate(Handle<Object> object) { ASSERT(!object->IsJSFunction()); // If you return a function from here, it will be called when an // attempt is made to call the given object as a constructor. // Objects created through the API can have an instance-call handler // that should be used when cal...
false
false
false
false
false
0
evntrec_event(evntrec **list, evntrec **last, int id_num) { evntrec *e, *lastchecked = NULL; for(e=*list; e!=NULL; e=e->next) { if(e->id == id_num) { /* No movetofront's for this list */ /* evntrec_movetofront(list,last,lastchecked,e); */ return e; } lastchecked = e; } return NULL; }
false
false
false
false
false
0
make_pub_auth(cachemgr_request * req) { static char buf[1024]; safe_free(req->pub_auth); debug(3) fprintf(stderr, "cmgr: encoding for pub...\n"); if (!req->passwd || !strlen(req->passwd)) return; /* host | time | user | passwd */ snprintf(buf, sizeof(buf), "%s|%d|%s|%s", req->hostname, (int) ...
false
false
false
false
false
0
create(int domain) { nSocket = socket(domain, SOCK_STREAM, 0); if(nSocket == -1){ return SOCKET_ERR; } if(setReuseAddr() == SOCKET_ERR){ close(); return SOCKET_ERR; } return SOCKET_OK; }
false
false
false
false
false
0
mapHeuOpts(SearchOptions* this_, const std::string& n, const std::string& v) { SolverStrategies& opts = *this_->solverOpts(); int i; uint32 x; bool b; if (n == "heuristic") { return mapEnumImpl(heuTypes, v, i) && SET(opts.heuId, (uint32)i); } else if (n == "berk-max") { return parse(v, x) && (SET(opts.heu...
false
false
false
false
false
0
load_png(std::string file) { std::string installed_file = INSTALL_LOCATION YC20_PNG_DIR + file; std::string local_file = YC20_PNG_DIR + file; cairo_surface_t *ret = cairo_image_surface_create_from_png (installed_file.c_str()); if (!check_cairo_png(ret)) { ret = cairo_image_surface_create_from_png (l...
false
false
false
false
false
0
XpTableNewColsAndRows( tw ) XpTableWidget tw; { XpTableVectorFree( tw->table.cols ); XpTableVectorFree( tw->table.rows ); tw->table.num_cols = XpTableLocNumCols( tw->table.real_layout ); tw->table.num_rows = XpTableLocNumRows( tw->table.real_layout ); if ( tw->table.num_cols && tw->table...
false
false
false
false
false
0
__pyx_f_7sklearn_5utils_19graph_shortest_path_rightmost_sibling(struct __pyx_t_7sklearn_5utils_19graph_shortest_path_FibonacciNode *__pyx_v_node) { struct __pyx_t_7sklearn_5utils_19graph_shortest_path_FibonacciNode *__pyx_v_temp; struct __pyx_t_7sklearn_5utils_19graph_shortest_path_FibonacciNode *__pyx_r; __Pyx_R...
false
false
false
false
false
0
ptmxReadAll(int fd, const void *origBuf, size_t maxCount) { typedef int hdr; char *buf = (char *)origBuf; int rc; while ((rc = readOnePacket(fd, buf, maxCount)) > 0) { buf += rc; } *(hdr *)buf = 0; /* Header count of zero means we're done */ buf += sizeof(hdr); JASSERT(rc < 0 || buf - (char *)origBu...
false
false
false
false
false
0
esl_FileNewSuffix(const char *filename, const char *sfx, char **ret_newpath) { char *new = NULL; char *lastdot; int nf; int status; if (ret_newpath != NULL) *ret_newpath = NULL; lastdot = strrchr(filename, '.'); /* check for suffix to replace */ if (lastdot != NULL && strchr(lastdot, eslDIR...
false
true
false
false
true
1
ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) { struct ext4_new_flex_group_data flex_gd; struct ext4_sb_info *sbi = EXT4_SB(sb); struct ext4_super_block *es = sbi->s_es; int reserved_gdb = ext4_bg_has_super(sb, input->group) ? le16_to_cpu(es->s_reserved_gdt_blocks) : 0; struct inode *...
false
false
false
false
false
0
UncheckedSetKey(const byte *key_string, unsigned int keylength, const NameValuePairs &) { AssertValidKeyLength(keylength); unsigned i, j=0, k; word32 data, dspace[2] = {0, 0}; memcpy(pbox, p_init, sizeof(p_init)); memcpy(sbox, s_init, sizeof(s_init)); // Xor key string into encryption key vector for (i=0 ; i<...
false
false
false
false
false
0
cache_readdata(cache_back * cache, const char *str1, const char *str2, char **inbuff, int *inlen) { #if HTS_FAST_CACHE if (cache->hashtable) { char BIGSTK buff[HTS_URLMAXSIZE * 4]; intptr_t pos; strcpybuff(buff, str1); strcatbuff(buff, str2); if (inthash_read(cache->hashtable, ...
false
false
false
false
false
0
vme_new_dma_list(struct vme_resource *resource) { struct vme_dma_resource *ctrlr; struct vme_dma_list *dma_list; if (resource->type != VME_DMA) { printk(KERN_ERR "Not a DMA resource\n"); return NULL; } ctrlr = list_entry(resource->entry, struct vme_dma_resource, list); dma_list = kmalloc(sizeof(struct vme_...
false
false
false
false
false
0
getById (int id, bool recursive) { if(id==getId()) return this; list<FWObject*>::iterator j; for(j=begin(); j!=end(); ++j) { FWObject *o=*j; int oid = o->getId(); if(id==oid) return o; if(recursive && (o=o->getById(id, true))!=NULL ) return o; } retur...
false
false
false
false
false
0
usdlg_data_add_unit(struct usdata_hash *ushash, const struct tile *ptile, struct unit *punit) { struct usdata *data; enum unit_activity act; fc_assert_ret(ushash); fc_assert_ret(punit); usdata_hash_lookup(ushash, utype_index(unit_type(punit)), ...
false
false
false
false
false
0
lio_cn6xxx_setup_pcie_mrrs(struct octeon_device *oct, enum octeon_pcie_mrrs mrrs) { u32 val; u64 r64; /* Read config register for MRRS */ pci_read_config_dword(oct->pci_dev, CN6XXX_PCIE_DEVCTL, &val); if (mrrs == PCIE_MRRS_DEFAULT) { mrrs = ((val & (0x7 << 12)) >> 12); } else { val &= ~(0x7 << 12); /* T...
false
false
false
false
false
0
parse_version(const char *versionString) { int cnt; int vmaj, vmin, vrev; cnt = sscanf(versionString, "%d.%d.%d", &vmaj, &vmin, &vrev); if (cnt < 2) return -1; if (cnt == 2) vrev = 0; return (100 * vmaj + vmin) * 100 + vrev; }
false
false
false
false
false
0
drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr, const char *filename) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; free(bufmgr_gem->aub_filename); if (filename) bufmgr_gem->aub_filename = strdup(filename); }
false
false
false
false
false
0
BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { int max; int add=0,neg=0; const BIGNUM *tmp; bn_check_top(a); bn_check_top(b); /* a - b a-b * a - -b a+b * -a - b -(a+b) * -a - -b b-a */ if (a->neg) { if (b->neg) { tmp=a; a=b; b=tmp; } else { add=1; neg=1; } } else { if (b-...
false
false
false
false
false
0
toString() const{ StringBuffer sb; sb.append(_T("(")); if (_buffer) sb.append( _buffer ); else sb.append( _T("null") ); sb.append(_T(",")); sb.appendInt( _startOffset ); sb.append(_T(",")); sb.appendInt( _endOffset ); if (!_tcscmp( _type, _T("word")) == 0 ){ sb.append(_T(",type="))...
false
false
false
false
false
0
gk104_pmu_pgob(struct nvkm_pmu *pmu, bool enable) { struct nvkm_device *device = pmu->subdev.device; if (!(nvkm_fuse_read(device->fuse, 0x31c) & 0x00000001)) return; nvkm_mask(device, 0x000200, 0x00001000, 0x00000000); nvkm_rd32(device, 0x000200); nvkm_mask(device, 0x000200, 0x08000000, 0x08000000); msleep(50...
false
false
false
false
false
0
fswc_add_image_y16(src_t *src, avgbmp_t *abitmap) { uint16_t *bitmap = (uint16_t *) src->img; uint32_t i = src->width * src->height; if(src->length < i) return(-1); while(i-- > 0) { *(abitmap++) += *bitmap >> 8; *(abitmap++) += *bitmap >> 8; *(abitmap++) += *(bitmap++) >> 8; } return(0); }
false
false
false
false
false
0
save() { // asm(".byte 0xcc"); String oldname; if (textfile->getFilename(oldname).isEmpty()) return false; dirtyview(); TempFile temp(IOAM_READ | IOAM_WRITE); ht_ltextfile *old = dynamic_cast<ht_ltextfile *>(textfile->getLayered()); String blub; old->getDesc(blub); old->seek(0); old->copyAllTo(&temp); pst...
false
false
false
false
false
0
GetTest(const char* testName) const { if(testName) { std::map<cmStdString, cmTest*>::const_iterator mi = this->Tests.find(testName); if(mi != this->Tests.end()) { return mi->second; } } return 0; }
false
false
false
false
false
0
gc_master_provider_handle_new_position_accuracy (GcMasterProvider *provider, GeoclueAccuracy *accuracy) { GcMasterProviderPrivate *priv = GET_PRIVATE (provider); GeoclueAccuracyLevel old_level; GeoclueAccuracyLevel new_level = GEOCLUE_ACCURACY_LEVEL_NONE; double new...
false
false
false
false
true
1
SSL_X509_getIDs(apr_pool_t *p, X509 *x509, apr_array_header_t **ids) { STACK_OF(GENERAL_NAME) *names; BIO *bio; X509_NAME *subj; char **cpp; int i, n; if (!x509 || !(*ids = apr_array_make(p, 0, sizeof(char *)))) { *ids = NULL; return FALSE; } /* First, the DNS-IDs (dNSN...
false
false
false
false
false
0
fs_mhash_write_header(fs_mhash *mh) { if (!mh) { fs_error(LOG_CRIT, "tried to write header of NULL mhash"); return 1; } struct mhash_header header; header.id = FS_MHASH_ID; header.size = mh->size; header.count = mh->count; header.search_dist = mh->search_dist; memset(&h...
false
false
false
false
false
0
ArgToChar(int type, void* Ptr) { static char RetCode[10][20]; static int Cnt = 0; Cnt = Cnt%10; switch(type) { case R_TYPE_INT : sprintf(RetCode[Cnt],"%d",*((int*) Ptr)); break; case R_TYPE_LONG : sprintf(RetCode[Cnt],"%ld",*((long*) Ptr)); break; case R_T...
false
false
false
false
false
0
RDFException(QString message, const Uri &uri) throw() : m_message(0) { setMessage(QString("%1 [with URI <%2>]").arg(message).arg(uri.toString())); }
false
false
false
false
false
0
Transport_FlushSpecific(TSS_HCONTEXT tspContext, /* in */ TCS_HANDLE hResHandle, /* in */ TPM_RESOURCE_TYPE resourceType) /* in */ { UINT64 offset; TSS_RESULT result; UINT32 handlesLen = 1; TCS_HANDLE *handles, handle; BYTE data[sizeof(UINT32)]; if ((result = obj_context_transport_init(tspContext))) retu...
false
false
false
false
false
0
sbf_value_valid(u8 v) { if (v & SBF_RESERVED) /* Reserved bits */ return 0; if (!parity(v)) return 0; return 1; }
false
false
false
false
false
0
window_wm_toolbar_show (gboolean show) { if (!wm_toolbar) return; wm_toolbar_visible = show; if (!show) window_wm_toolbar_reset (); else if (!gtk_video_is_fullscreen ((GtkVideo *)gtv)) window_wm_toolbar_restore (); ui_set_status (UI_WM_TOOLBAR); }
false
false
false
false
false
0
set_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, Index rti) { RangeTblEntry *rte = rt_fetch(rti, root->parse->rtable); if (rte->inh) { /* It's an "append relation", process accordingly */ set_append_rel_pathlist(root, rel, rti, rte); } else if (rel->rtekind == RTE_SUBQUERY) { /* Subquery --- generate a...
false
false
false
false
false
0
encode_sleb128 (gint32 value, guint8 *buf, guint8 **endbuf) { gboolean more = 1; gboolean negative = (value < 0); guint32 size = 32; guint8 byte; guint8 *p = buf; while (more) { byte = value & 0x7f; value >>= 7; /* the following is unnecessary if the * implementation of >>= uses an arithmetic rather ...
false
false
false
false
false
0
property_refresh_app(property_t *prop) { app_t *app; //GError *err; GdkPixbuf *pix, *pix_scaled; int scale_width, scale_height; g_assert(prop != NULL); g_assert(prop->apwal != NULL); g_assert(prop->apwal->apps != NULL); g_assert(prop->apwal->selected_app != NULL); app = prop->apwal->s...
false
false
false
false
false
0