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
find_file_spec_function (int argc, const char **argv) { const char *file; if (argc != 1) abort (); file = find_file (argv[0]); return file; }
false
false
false
false
false
0
count_7mers_fwd_partial (int *counts, UINT4 high_rev, UINT4 low_rev, UINT4 nexthigh_rev, int startdiscard, int enddiscard) { UINT4 masked; int pos; pos = startdiscard; while (pos <= enddiscard && pos <= 9) { masked = high_rev >> (18 - 2*pos); masked &= MASK7; debug(printf("%d %04X\n",pos,masked...
false
false
false
false
false
0
lzma_literal(struct xz_dec_lzma2 *s) { uint16_t *probs; uint32_t symbol; uint32_t match_byte; uint32_t match_bit; uint32_t offset; uint32_t i; probs = lzma_literal_probs(s); if (lzma_state_is_literal(s->lzma.state)) { symbol = rc_bittree(&s->rc, probs, 0x100); } else { symbol = 1; match_byte = dict_get...
false
false
false
false
false
0
cpl_image_get_fwhm( const cpl_image * in, cpl_size xpos, cpl_size ypos, double * fwhm_x, double * fwhm_y) { double half_max; double thres; const cpl_size minimum_size = 5; int ...
false
false
false
false
false
0
slic_rcvqueue_reinsert(struct adapter *adapter, struct sk_buff *skb) { struct slic_rcvqueue *rcvq = &adapter->rcvqueue; void *paddr; u32 paddrl; u32 paddrh; struct slic_rcvbuf *rcvbuf = (struct slic_rcvbuf *)skb->head; struct device *dev; paddr = (void *)(unsigned long) pci_map_single(adapter->pcidev, skb->he...
false
false
false
false
false
0
merge_star(GList *csl, struct cat_star *new) { GList *sl; struct cat_star *cats; for (sl = csl; sl != NULL; sl = sl->next) { cats = CAT_STAR(sl->data); if (cats_is_duplicate(cats, new)) { /* these are the funny replacement/reject rules */ if (CATS_TYPE(cats) == CAT_STAR_TYPE_SREF) { cat_star_release(c...
false
false
false
false
false
0
array_slide_down(array *a, int n) { int i; a = array_check(a); if(n <= 0) { n = 0; } for(i = a->n; i > n; i--) { a->data[i] = a->data[i-1]; } return a; }
false
false
false
false
false
0
l2tp_tunnel_checkchallresp(uint8_t msgident, const struct l2tp_conn_t *conn, const struct l2tp_attr_t *challresp) { uint8_t challref[MD5_DIGEST_LENGTH]; if (conn->secret == NULL || conn->secret_len == 0) { if (challresp) { log_tunnel(log_warn, conn, "discarding unexpected Challenge Re...
false
false
false
false
false
0
tray_constructor(plugin_instance *p) { tray_priv *tr; GdkScreen *screen; GtkWidget *ali; ENTER; tr = (tray_priv *) p; class_get("tray"); ali = gtk_alignment_new(0.5, 0.5, 0, 0); g_signal_connect(G_OBJECT(ali), "size-allocate", (GCallback) tray_size_alloc, tr); gtk_contai...
false
false
false
false
false
0
mdb_stats_on(MdbHandle *mdb) { if (!mdb->stats) mdb->stats = g_malloc0(sizeof(MdbStatistics)); mdb->stats->collect = TRUE; }
false
false
false
false
false
0
set_var(struct fbtft_par *par) { /* MADCTL - Memory data access control RGB/BGR: 1. Mode selection pin SRGB RGB H/W pin for color filter setting: 0=RGB, 1=BGR 2. MADCTL RGB bit RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR */ switch (par->info->var.rotate) { case 0: write_reg(par, 0x36, MX |...
false
false
false
false
false
0
deleteSubtree( const QModelIndex& idx ) { d->scene.deleteSubtree( d->scene.summaryHandlingModel()->mapFromSource( idx ) ); }
false
false
false
false
false
0
bd_queue_initialize(struct ipw2100_priv *priv, struct ipw2100_bd_queue *q, u32 base, u32 size, u32 r, u32 w) { IPW_DEBUG_INFO("enter\n"); IPW_DEBUG_INFO("initializing bd queue at virt=%p, phys=%08x\n", q->drv, (u32) q->nic); write_register(priv->net_dev, base, q->nic); write_register(priv->net_de...
false
false
false
false
false
0
gee_concurrent_set_sub_iterator_real_has_next (GeeIterator* base) { GeeConcurrentSetSubIterator * self; gboolean result = FALSE; GeeHazardPointerContext* ctx = NULL; GeeHazardPointerContext* _tmp0_ = NULL; GeeConcurrentSetTowerIter _tmp1_ = {0}; GeeConcurrentSetTower* _tmp2_ = NULL; self = (GeeConcurrentSetSubIt...
false
false
false
false
false
0
oceanic_vtpro_device_open (dc_device_t **out, dc_context_t *context, const char *name) { if (out == NULL) return DC_STATUS_INVALIDARGS; // Allocate memory. oceanic_vtpro_device_t *device = (oceanic_vtpro_device_t *) malloc (sizeof (oceanic_vtpro_device_t)); if (device == NULL) { ERROR (context, "Failed to allo...
false
false
false
false
false
0
AutoVacuumingActive(void) { if (!autovacuum_start_daemon || !pgstat_collect_startcollector || !pgstat_collect_tuplelevel) return false; return true; }
false
false
false
false
false
0
ndmp_sxa_data_start_recover_filehist (struct ndm_session *sess, struct ndmp_xa_buf *xa, struct ndmconn *ref_conn) { ndmp9_error error; int rc; NDMS_WITH(ndmp9_data_start_recover) rc = data_ok_bu_type (sess, xa, ref_conn, request->bu_type); if (rc) { return rc; } if (request->addr.addr_type != NDMP9...
false
false
false
false
false
0
TCSP_CMK_CreateTicket_Internal(TCS_CONTEXT_HANDLE hContext, /* in */ UINT32 PublicVerifyKeySize, /* in */ BYTE* PublicVerifyKey, /* in */ TPM_DIGEST SignedData, /* in */ UINT32 SigValueSize, /* in */ BYTE* SigValue, /* in */ TPM_AUTH* pOwnerAuth,...
false
false
false
false
false
0
open_config() { FILE *fp = NULL; char *line; key_cmd *cmd; confentry *lastnode = NULL, *newnode = NULL; int lineno = 1, ret = 0; size_t n = 0; /* Allow the configuration file to be overridden */ if (!config) config = CONFIG; fp = fopen(config, "r"); if (fp == NULL) { lprintf(...
false
false
false
true
false
1
__ioc_wait_on_page (ioc_page_t *page, call_frame_t *frame, off_t offset, size_t size) { ioc_waitq_t *waitq = NULL; ioc_local_t *local = NULL; GF_VALIDATE_OR_GOTO ("io-cache", frame, out); local = frame->local; GF_VALIDATE_OR_GOTO (frame->this->name, local, o...
false
false
false
true
false
1
CONF_get_string(LHASH_OF(CONF_VALUE) *conf,const char *group, const char *name) { if (conf == NULL) { return NCONF_get_string(NULL, group, name); } else { CONF ctmp; CONF_set_nconf(&ctmp, conf); return NCONF_get_string(&ctmp, group, name); } }
false
false
false
false
false
0
soap_out_a__address(struct soap *soap, const char *tag, int id, const a__address *a, const char *type) { soap_set_attr(soap, "ID", soap_int2s(soap, ((a__address*)a)->ID), 1); if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_a__address), type)) return soap->error; if (soap_out_std__stri...
false
false
false
false
false
0
reset() { delete dec; dec = 0; in.resize(0); out = ""; at = 0; paused = false; mightChangeEncoding = true; checkBad = true; last = QChar(); v_encoding = ""; resetLastData(); }
false
false
false
false
false
0
c67x00_add_iso_urb(struct c67x00_hcd *c67x00, struct urb *urb) { struct c67x00_urb_priv *urbp = urb->hcpriv; if (frame_after_eq(c67x00->current_frame, urbp->ep_data->next_frame)) { char *td_buf; int len, pid, ret; BUG_ON(urbp->cnt >= urb->number_of_packets); td_buf = urb->transfer_buffer + urb->iso_f...
false
false
false
false
false
0
GEN_species_add_entry(GBDATA *gb_pseudo, const char *key, const char *value) { GB_ERROR error = 0; GB_clear_error(); GBDATA *gbd = GB_entry(gb_pseudo, key); if (!gbd) { // key does not exist yet -> create gbd = GB_create(gb_pseudo, key, GB_STRING); if (!gbd) error = GB_...
false
false
false
false
false
0
closeImg2(AbstractFile* file) { InfoImg2* info = (InfoImg2*) (file->data); uint32_t cksum; if(info->dirty) { info->file->seek(info->file, sizeof(info->header)); info->file->write(info->file, info->buffer, info->header.dataLen); info->header.dataLenPadded = info->header.dataLen; flipImg2Header(&(info->h...
false
false
false
false
false
0
light_read(struct seq_file *m) { int status; if (!tp_features.light) { seq_printf(m, "status:\t\tnot supported\n"); } else if (!tp_features.light_status) { seq_printf(m, "status:\t\tunknown\n"); seq_printf(m, "commands:\ton, off\n"); } else { status = light_get_status(); if (status < 0) return status;...
false
false
false
false
false
0
traceSubObjects(Collector &c) const { c.trace(flowObj_); if (display_) for (ELObj **p = display_; *p; p++) c.trace(*p); }
false
false
false
false
false
0
startRendering() { if (m_thing)stopRendering(); m_thing = gluNewQuadric(); gluQuadricTexture(m_thing, GL_FALSE); gluQuadricDrawStyle(m_thing, static_cast<GLenum>(GLU_FILL)); m_change = 1; }
false
false
false
false
false
0
dw_mci_req_show(struct seq_file *s, void *v) { struct dw_mci_slot *slot = s->private; struct mmc_request *mrq; struct mmc_command *cmd; struct mmc_command *stop; struct mmc_data *data; /* Make sure we get a consistent snapshot */ spin_lock_bh(&slot->host->lock); mrq = slot->mrq; if (mrq) { cmd = mrq->cmd; ...
false
false
false
false
false
0
_k_slotSymLink() { KNameAndUrlInputDialog* dlg = static_cast<KNameAndUrlInputDialog*>(m_fileDialog); m_copyData.m_chosenFileName = dlg->name(); // no path KUrl linkUrl = dlg->url(); // the url to put in the file if (m_copyData.m_chosenFileName.isEmpty() || linkUrl.isEmpty()) return; if (l...
false
false
false
false
false
0
_dxf_ExReadDXRCFiles () { struct passwd *pass; char buf [1024]; struct stat curr; /* local dir */ struct stat home; /* home dir */ struct stat sys; /* system dir */ struct stat sys2; /* system dir */ int n; char *root; /* * Since the inputs get stacked we w...
true
true
false
false
true
1
icmp_load(netsnmp_cache *cache, void *vmagic) { long ret_value = -1; ret_value = linux_read_icmp_stat(&icmpstat); if ( ret_value < 0 ) { DEBUGMSGTL(("mibII/icmp", "Failed to load ICMP Group (linux)\n")); } else { DEBUGMSGTL(("mibII/icmp", "Loaded ICMP Group (linux)\n")); ...
false
true
false
false
false
1
evhttp_read_header(struct evhttp_connection *evcon, struct evhttp_request *req) { enum message_read_status res; int fd = evcon->fd; res = evhttp_parse_headers(req, bufferevent_get_input(evcon->bufev)); if (res == DATA_CORRUPTED || res == DATA_TOO_LONG) { /* Error while reading, terminate */ event_debug(("...
false
false
false
false
false
0
gst_tee_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstTee *tee = GST_TEE (object); GST_OBJECT_LOCK (tee); switch (prop_id) { case PROP_HAS_SINK_LOOP: tee->has_sink_loop = g_value_get_boolean (value); if (tee->has_sink_loop) { g_warning (...
false
false
false
false
false
0
add_load_option(DYNAMIC_STRING *str, const char *option, const char *option_value) { if (!option_value) { /* Null value means we don't add this option. */ return; } dynstr_append_checked(str, option); if (strncmp(option_value, "0x", sizeof("0x")-1) == 0) { /* It'...
false
false
false
false
false
0
gt_computePackedIndexDefaults(struct bwtOptions *paramOutput, int extraToggles) { if (gt_option_is_set(paramOutput->useLocateBitmapOption)) paramOutput->final.featureToggles |= (paramOutput->useLocateBitmap?BWTLocateBitmap:BWTLocateCount); else paramOutput->final.featureToggles |= estimateBestLo...
false
false
false
false
false
0
GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const { Float x, x1, x2, x3, y, y1, y2, y3, A; localPt.set_size(3); x = globalPt[0]; y = globalPt[1]; x1 = this->m_node[0]->GetCoordinates()[0]; y1 = this->m_node[0]->GetCoordinates()[1]; x2 = this->m_node[1]->GetCoor...
false
false
false
false
false
0
tracker_spawn (gchar **argv, gint timeout, gchar **tmp_stdout, gchar **tmp_stderr, gint *exit_status) { GError *error = NULL; GSpawnFlags flags; gboolean result; g_return_val_if_fail (argv != NULL, FALSE); g_return_val_if_fail (argv[0] != ...
false
false
false
false
false
0
RS_isRegis(const char *str) { int state = RS_IN_WAIT; const char *c = str; while (*c) { if (state == RS_IN_WAIT) { if (t_isalpha(c)) /* okay */ ; else if (t_iseq(c, '[')) state = RS_IN_ONEOF; else return false; } else if (state == RS_IN_ONEOF) { if (t_iseq(c, '^')) state = ...
false
false
false
false
false
0
build_objc_method_call (location_t loc, int super_flag, tree method_prototype, tree lookup_object, tree selector, tree method_params) { tree sender = (super_flag ? umsg_super_decl : (flag_objc_direct_dispatch ? umsg_fast_decl : umsg_decl)); tree rcv_p = (super_flag ? objc_super_type : objc_obje...
false
false
false
false
false
0
bcf_idx_core(bcf_t *bp, bcf_hdr_t *h) { bcf_idx_t *idx; int32_t last_coor, last_tid; uint64_t last_off; kstring_t *str; BGZF *fp = bp->fp; bcf1_t *b; int ret; b = calloc(1, sizeof(bcf1_t)); str = calloc(1, sizeof(kstring_t)); idx = (bcf_idx_t*)calloc(1, sizeof(bcf_idx_t)); idx->n = h->n_ref; idx->index2 = ...
false
false
false
false
false
0
gsm_store_foreach (GsmStore *store, GsmStoreFunc func, gpointer user_data) { g_return_if_fail (store != NULL); g_return_if_fail (func != NULL); g_hash_table_find (store->priv->objects, (GHRFunc)func, ...
false
false
false
false
false
0
rc_proc_getent(const char *ent) { #ifdef __linux__ FILE *fp; char *proc, *p, *value = NULL; size_t i, len; if (!exists("/proc/cmdline")) return NULL; if (!(fp = fopen("/proc/cmdline", "r"))) return NULL; proc = NULL; i = 0; if (rc_getline(&proc, &i, fp) == -1 || proc == NULL) return NULL; if (proc !=...
false
false
true
false
true
1
page_objects_list_insert(fz_context *ctx, pdf_write_options *opts, int page, int object) { page_objects_list_ensure(ctx, &opts->page_object_lists, page+1); if (opts->page_object_lists->len < page+1) opts->page_object_lists->len = page+1; page_objects_insert(ctx, &opts->page_object_lists->page[page], object); }
false
false
false
false
false
0
detect_surround_target() { #define DIMENSION 3 #define CHECK_SIZE DIMENSION*DIMENSION int curXLoc = next_x_loc(); int curYLoc = next_y_loc(); int checkXLoc, checkYLoc, xShift, yShift; Unit *targetPtr; Location *locPtr; short targetRecno; for(int i=2; i<=CHECK_SIZE; ++i) { misc.cal_move_around_a_point(i,...
false
false
false
false
false
0
OpComplete(ClientInfo *pClient, int Err) { pClient->Err = Err; if(pClient->Complete != NULL) { pClient->Complete(pClient); } else { DeleteClient(pClient); } }
false
false
false
false
false
0
fastjetsiscone_(const double * p, const int & npart, const double & R, const double & f, double * f77jets, int & njets) { // prepare jet def plugin.reset(new SISConePlugin(R,f)); jet_def = plugin.get(); // do everythin...
false
false
false
false
false
0
DailyRollingFileAppender( const Properties& properties) : FileAppender(properties, std::ios::app) , maxBackupIndex(10) { DailyRollingFileSchedule theSchedule = DAILY; tstring scheduleStr = properties.getProperty(LOG4CPLUS_TEXT("Schedule")); scheduleStr = helpers::toUpper(scheduleStr); if(sc...
false
false
false
false
false
0
Flags2String(int flags, const Flag *descr, const std::string &sep) { std::list<std::string> tmp; while (descr->m_flag) { if (flags & descr->m_flag) { tmp.push_back(descr->m_description); } ++descr; } return boost::join(tmp, ", "); }
false
false
false
false
false
0
canSplitCriticalExits(const SplitAnalysis::LoopBlocks &Blocks, BlockPtrSet &CriticalExits) { // If we don't allow critical edge splitting, require no critical exits. if (!AllowSplit) return CriticalExits.empty(); for (BlockPtrSet::iterator I = CriticalExits.begin(), E = C...
false
false
false
false
false
0
initValue(GraphView const *gv, unsigned int chain) { double const *x = gv->nodes()[0]->value(chain); unsigned int N = gv->nodes()[0]->length(); vector<double> ivalue(N); for (unsigned int i = 0; i < N; ++i) { ivalue[i] = x[i]; } return ivalue; }
false
false
false
false
false
0
append_char(char **pp, char *e, char c) { if (*pp < e) *(*pp)++ = c; }
false
false
false
false
false
0
varm(aELEMENT *vary) { if (vary) { vazap(vary, 0, aLen(vary)); joe_free((int *) vary - 2); } }
false
false
false
false
false
0
_dbus_type_reader_read_raw (const DBusTypeReader *reader, const unsigned char **value_location) { _dbus_assert (!reader->klass->types_only); *value_location = _dbus_string_get_const_data_len (reader->value_str, reader->value_pos, ...
false
false
false
false
false
0
qcCopyValue(VimosDescriptor *header, const char *name, const char *unit, const char *comment) { const char fctid[] = "qcCopyValue"; VimosDescriptor *desc; int status = EXIT_FAILURE; int i; char *pafName; char *keep; char *pos; int ...
false
false
false
false
false
0
xfs_btree_check_block( struct xfs_btree_cur *cur, /* btree cursor */ struct xfs_btree_block *block, /* generic btree block pointer */ int level, /* level of the btree block */ struct xfs_buf *bp) /* buffer containing block, if any */ { if (cur->bc_flags & XFS_BTREE_LONG_PTRS) return xfs_btree_check_lblock(cur...
false
false
false
false
false
0
render(Window& srcWindow, const ColourRect* modcols, const Rect* clipper) const { // TODO: Fix layer priority handling // render all layers defined for this state for(LayersList::const_iterator curr = d_layers.begin(); curr != d_layers.end(); ++curr) (*curr).render(srcWindow, mo...
false
false
false
false
false
0
c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; unsigned char *data; int i; /* Sanity check OID encoding: can't have leading 0x80 in * subidentifiers, see: X.690 8.19.2 */ for (i = 0, p = *pp; i < len; i++, p++) { if (*p == 0x80 ...
false
false
false
false
false
0
evthread_notify_base(struct event_base *base) { EVENT_BASE_ASSERT_LOCKED(base); if (!base->th_notify_fn) return -1; if (base->is_notify_pending) return 0; base->is_notify_pending = 1; return base->th_notify_fn(base); }
false
false
false
false
false
0
float_up(heap_context ctx, int i, void *elt) { int p; for ( p = heap_parent(i); i > 1 && ctx->higher_priority(elt, ctx->heap[p]); i = p, p = heap_parent(i) ) { ctx->heap[i] = ctx->heap[p]; if (ctx->index != NULL) (ctx->index)(ctx->heap[i], i); } ctx->heap[i] = elt; if (ctx->index != NULL) ...
false
false
false
false
false
0
dump_attrs_list (attrs list) { for (; list; list = list->next) { if (dv_is_decl_p (list->dv)) print_mem_expr (dump_file, dv_as_decl (list->dv)); else print_rtl_single (dump_file, dv_as_value (list->dv)); fprintf (dump_file, "+" HOST_WIDE_INT_PRINT_DEC, list->offset); } fprintf (dump_file...
false
false
false
false
false
0
load_special(name) const char *name; { dlb *fd; boolean result = FALSE; char c; struct version_info vers_info; fd = dlb_fopen(name, RDBMODE); if (!fd) return FALSE; Fread((genericptr_t) &vers_info, sizeof vers_info, 1, fd); if (!check_version(&vers_info, name, TRUE)) goto give_up; Fread((genericptr_t) ...
false
false
false
false
false
0
aodv_extension(const struct aodv_ext *ep, u_int length) { u_int i; const struct aodv_hello *ah; switch (ep->type) { case AODV_EXT_HELLO: if (snapend < (u_char *) ep) { printf(" [|hello]"); return; } i = min(length, (u_int)(snapend - (u_char *)ep)); if (i < sizeof(struct aodv_hello)) { printf(" [|h...
false
false
false
false
false
0
directory_info_has_arrived(time_t now, int from_cache) { const or_options_t *options = get_options(); if (!router_have_minimum_dir_info()) { int quiet = directory_too_idle_to_fetch_descriptors(options, now); log(quiet ? LOG_INFO : LOG_NOTICE, LD_DIR, "I learned some more directory information, but ...
false
false
false
false
false
0
get_colours (guint i, guint *bcol, guint *fcol) { guint tmp; /* ensure that we are within 1..10 */ i = i % 10; switch (i) { case 0: tmp = sat_cfg_get_int (SAT_CFG_INT_SKYATGL_COL_01); break; case 1: tmp = sat_cfg_get_int (SAT_CFG_INT_SKYATGL_COL_02); break; ...
false
false
false
false
false
0
msp_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq) { struct msp_state *state = to_state(sd); struct i2c_client *client = v4l2_get_subdevdata(sd); v4l_dbg(1, msp_debug, client, "Setting I2S speed to %d\n", freq); switch (freq) { case 1024000: state->i2s_mode = 0; break; case 2048000: state->i2s_mo...
false
false
false
false
false
0
solo_valid_pixfmt(u32 pixfmt, int dev_type) { return (pixfmt == V4L2_PIX_FMT_H264 && dev_type == SOLO_DEV_6110) || (pixfmt == V4L2_PIX_FMT_MPEG4 && dev_type == SOLO_DEV_6010) || pixfmt == V4L2_PIX_FMT_MJPEG ? 0 : -EINVAL; }
false
false
false
false
false
0
xfxp(int nset, double x, double Q, double P2, int ip, int fl) { vector<double> r(13); fevolvepdfpm(&nset, &x, &Q, &P2, &ip, &r[0]); return r[fl+6]; }
false
false
false
false
false
0
is_authorized(struct connection *conn, const char *path, int is_directory) { FILE *fp; int authorized = MG_TRUE; if ((fp = open_auth_file(conn, path, is_directory)) != NULL) { authorized = mg_authorize_digest(&conn->mg_conn, fp); fclose(fp); } return authorized; }
false
false
false
false
false
0
selectUpperIslands(Island *f,int nX,int nY,int *incomplete) { int i,j; Island *l,*g; l=NULL; for(i=f->endX+f->endY+2,j=nX+nY-2;i<=j;i++) for(g=ZB[i];g;g=g->nextBeginIndex) if(g->beginX>f->endX&&g->beginY>f->endY) { if(!g->hasUpper) {*incomplete=TRUE; return(NULL);} ...
false
false
false
false
false
0
PyFF_Font_get_woffMajor(PyFF_Font *self,void *closure) { int version = self->fv->sf->woffMajor; if ( version==woffUnset ) Py_RETURN_NONE; return( Py_BuildValue("i", version )); }
false
false
false
false
false
0
FuncHASH_FLAGS ( Obj self, Obj flags ) { Int4 hash; Int4 x; Int len; UInt4 * ptr; Int i; /* do some trivial checks */ while ( T...
false
false
false
false
false
0
HighlightVisibleChildren(ListTreeWidget w, ListTreeItem * item, Boolean state, Boolean draw) #else static void HighlightVisibleChildren(w, item, state, draw) ListTreeWidget w; ListTreeItem * item; Boolean state; Boolean draw; #endif { while (item) { HighlightItem(w, item...
false
false
false
false
false
0
process_scan_header(jpeg *z) { int i; int Ls = get16(z->s); z->scan_n = get8(z->s); if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return e("bad SOS component count","Corrupt JPEG"); if (Ls != 6+2*z->scan_n) return e("bad SOS len","Corrupt JPEG"); for (i=0; i < z->scan_n; ++i) { ...
false
false
false
false
false
0
gamgi_engine_link_object_cell (gamgi_object *object, gamgi_cell *cell) { /****************************** * bonds have no cell parents * ******************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_cell (GAMGI_CAST_TEXT object, cell); break; case GAMGI_ENGINE_ORBI...
false
false
false
false
false
0
eval_state(state_t *state) { int ret; #ifdef USE_HASH_EVAL if (!hash_get_eval(state->zobrist, &ret)) { #endif int wmaterial = eval_material(state, WHITE); int bmaterial = eval_material(state, BLACK); int is_endgame = wmaterial < 1300 && bmaterial < 1300; ret = wmaterial - ...
false
false
false
false
false
0
compute_ld_motion_mems (void) { struct ls_expr * ptr; basic_block bb; rtx insn; pre_ldst_mems = NULL; FOR_EACH_BB (bb) { for (insn = BB_HEAD (bb); insn && insn != NEXT_INSN (BB_END (bb)); insn = NEXT_INSN (insn)) { if (INSN_P (insn)) { if (GET_CODE (PATTERN (insn)) == SET) ...
false
false
false
false
false
0
add_layer_request(struct FlattenSpec *spec, const char *layer) { spec->layers = realloc(spec->layers, sizeof(struct xcfLayer) * (1+spec->numLayers)); if( spec->layers == NULL ) FatalUnexpected(_("Out of memory")); spec->layers[spec->numLayers].name = layer ; spec->layers[spec->numLa...
false
false
false
false
false
0
cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type) { const unsigned int *flagp = type->of; int n = 0; cfg_print_chars(pctx, "( ", 2); if (*flagp & CFG_ADDR_V4OK) { cfg_print_cstr(pctx, "<ipv4_address>"); n++; } if (*flagp & CFG_ADDR_V6OK) { if (n != 0) cfg_print_chars(pctx, " | ", 3); cfg_pr...
false
false
false
false
false
0
opendev(double width, double height, GLEFileLocation* outputfile, const string& inputfile) throw(ParserError) { m_width = width; m_height = height; m_OutputName.copy(outputfile); m_OutputName.addExtension(g_device_to_ext(getDeviceType())); m_surface = cairo_svg_surface_create(m_OutputName.getFullPath().c_str(), 72...
false
false
false
false
false
0
pushcli(void) { int eflags; eflags = read_eflags(); cli(); if(cpus[cpu()].ncli++ == 0) cpus[cpu()].intena = eflags & FL_IF; }
false
false
false
false
false
0
send_game_beacon() { static uint32_t ticks = 0; uint32_t player_id; uint32_t cur_ticks; cur_ticks = misc.get_time(); if (game_sock && (cur_ticks > ticks + 3000 || cur_ticks < ticks)) { // send the session beacon struct MsgGameBeacon p; ticks = cur_ticks; p.msg_id = MPMSG_GAME_BEACON; strncpy(p.name, j...
false
false
false
false
false
0
xstrset(char *&mem,const char *s,size_t len) { if(!s) { xfree(mem); return mem=0; } #ifdef MEM_DEBUG printf("xstrset \"%.*s\"\n",len,s); #endif if(s==mem) { mem[len]=0; return mem; } size_t old_len=(mem?strlen(mem)+1:0); if(mem && s>mem && s<mem+old_len) { mem...
false
false
false
false
false
0
getParamValue() { string value; if((value = Utils::Xml::get_property(param_cur, "value")) != "") return value; else return Utils::Xml::get_property(param_cur, "default"); }
false
false
false
false
false
0
DoValAndDictTypesMatch( QTYPES eValType, FLMUINT uiDictType) { if (uiDictType > FLM_CONTEXT_TYPE) { return( FALSE); } else { // subtract 1 from QTYPES - array doesn't have space for the NO_TYPE enum return gv_DoValAndDictTypesMatch[ ((int)eValType) - FIRST_VALUE][ uiDictType]; } }
false
false
false
false
false
0
mono_bitset_clone (const MonoBitSet *set, guint32 new_size) { MonoBitSet *result; if (!new_size) new_size = set->size; result = mono_bitset_new (new_size, set->flags); result->flags &= ~MONO_BITSET_DONT_FREE; memcpy (result->data, set->data, set->size / 8); return result; }
false
false
false
false
false
0
getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue) { if (_getCharPropertyFn) return _getCharPropertyFn(_widget, prop, index, defaultValue); else return defaultValue; }
false
false
false
false
false
0
ccid_error(int error, const char *file, int line, const char *function) { const char *text; char var_text[30]; switch (error) { case 0x00: text = "Command not supported or not allowed"; break; case 0x01: text = "Wrong command length"; break; case 0x05: text = "Invalid slot number"; break;...
true
true
false
false
false
1
ixgbe_set_mux(struct ixgbe_hw *hw, u8 state) { u32 esdp; if (!hw->bus.lan_id) return; esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); if (state) esdp |= IXGBE_ESDP_SDP1; else esdp &= ~IXGBE_ESDP_SDP1; IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp); IXGBE_WRITE_FLUSH(hw); }
false
false
false
false
false
0
replace_selected_text (GtkTextBuffer * buffer, const gchar * replace) { g_return_if_fail (gtk_text_buffer_get_selection_bounds (buffer, NULL, NULL)); g_return_if_fail (replace != NULL); gtk_text_buffer_begin_user_action (buffer); gtk_text_buffer_delete_selection (buffer, FALSE, TRUE); g...
false
false
false
false
false
0
amdgpu_cgs_read_ind_register(void *cgs_device, enum cgs_ind_reg space, unsigned index) { CGS_FUNC_ADEV; switch (space) { case CGS_IND_REG__MMIO: return RREG32_IDX(index); case CGS_IND_REG__PCIE: return RREG32_PCIE(index); case CGS_IND_REG__SMC: return RREG32_SMC(index); case CGS_IND_REG_...
false
false
false
false
false
0
gst_encoding_container_profile_has_video (GstEncodingContainerProfile * profile) { const GList *l; for (l = profile->encodingprofiles; l != NULL; l = l->next) { if (GST_IS_ENCODING_VIDEO_PROFILE (l->data)) return TRUE; if (GST_IS_ENCODING_CONTAINER_PROFILE (l->data) && gst_encoding_container_...
false
false
false
false
false
0
maybe_warn_unused_local_typedefs (void) { int i; tree decl; /* The number of times we have emitted -Wunused-local-typedefs warnings. If this is different from errorcount, that means some unrelated errors have been issued. In which case, we'll avoid emitting "unused-local-typedefs" warnings. */ ...
false
false
false
false
false
0
clk_notifier_unregister(struct clk *clk, struct notifier_block *nb) { struct clk_notifier *cn = NULL; int ret = -EINVAL; if (!clk || !nb) return -EINVAL; clk_prepare_lock(); list_for_each_entry(cn, &clk_notifier_list, node) if (cn->clk == clk) break; if (cn->clk == clk) { ret = srcu_notifier_chain_un...
false
false
false
false
false
0
gst_video_format_from_rgb24_masks (int red_mask, int green_mask, int blue_mask) { if (red_mask == 0xff0000 && green_mask == 0x00ff00 && blue_mask == 0x0000ff) { return GST_VIDEO_FORMAT_RGB; } if (red_mask == 0x0000ff && green_mask == 0x00ff00 && blue_mask == 0xff0000) { return GST_VIDEO_FORMAT_BGR; } ...
false
false
false
false
false
0
GetNumberOfClippingPlanes() { int n = 0; if ( this->ClippingPlanes ) { n = this->ClippingPlanes->GetNumberOfItems(); } return n; }
false
false
false
false
false
0
onenand_read_bufferram(struct mtd_info *mtd, int area, unsigned char *buffer, int offset, size_t count) { struct onenand_chip *this = mtd->priv; void __iomem *bufferram; bufferram = this->base + area; bufferram += onenand_bufferram_offset(mtd, area); if (ONENAND_CHECK_BYTE_ACCESS(count)) { unsigned short wo...
false
false
false
false
false
0
parser_cxx_assist_query_calltip (ParserCxxAssist* assist, const gchar *call_context, IAnjutaIterable* calltip_iter) { /* Search file */ if (IANJUTA_IS_FILE (assist->priv->itip)) { GFile *file = ianjuta_file_get_file (IANJUTA_FILE (assist->priv->itip...
false
false
false
false
false
0
debug_func (GPLogLevel level, const char *domain, const char *str, void *data) { struct timeval tv; long sec, usec; FILE *logfile = (data != NULL)?(FILE *)data:stderr; gettimeofday (&tv,NULL); sec = tv.tv_sec - glob_tv_zero.tv_sec; usec = tv.tv_usec - glob_tv_zero.tv_usec; if (usec < 0) {sec--; usec += 1000000...
false
false
false
false
false
0