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
GetFile( void ) const { string fw_file; const char *file = str->String(); if ( file ) { fw_file.append( path ); append_path_delim( fw_file ); fw_file.append( file ); // append the suffix if necessary if ( suffix.length() > 0 ) { short suflen = suffix.length(); string::size_type p...
false
false
false
false
false
0
grcan_poll(struct napi_struct *napi, int budget) { struct grcan_priv *priv = container_of(napi, struct grcan_priv, napi); struct net_device *dev = priv->dev; struct grcan_registers __iomem *regs = priv->regs; unsigned long flags; int tx_work_done, rx_work_done; int rx_budget = budget / 2; int tx_budget = budget ...
false
false
false
false
false
0
Scm_HasSetter(ScmObj proc) { if (SCM_PROCEDUREP(proc)) { return !SCM_FALSEP(SCM_PROCEDURE(proc)->setter); } else { /* setter of object-apply is used. */ return TRUE; } }
false
false
false
false
false
0
gnc_prefs_init (void) { gnc_gsettings_load_backend(); /* Initialize the core preferences by reading their values from the loaded backend. * Note: of no backend was loaded, these functions will return sane default values. */ file_retain_changed_cb (NULL, NULL, NULL); file_retain_type_changed_c...
false
false
false
false
false
0
parse_float(eval_scalar *f, char *fpn) { char *end; double d; d=strtod(fpn, &end); if (*end == 0) { f->type=SCALAR_FLOAT; f->scalar.floatnum.value=d; return 1; } return 0; }
false
false
false
false
false
0
do_refresh(void) { if (visual && need_more_refresh) update_status_field(NULL, STAT_MORE); if (need_refresh >= REF_LOGICAL) logical_refresh(); else if (need_refresh >= REF_PHYSICAL) physical_refresh(); }
false
false
false
false
false
0
L33__PSIMP__loop(base0) register object *base0; { register object *base=vs_base; register object *sup=base+VM101; VC101 vs_check; {object V916; V916=(base[0]); vs_top=sup; goto TTL; TTL:; {object V917; V917= Cnil; {object V918; object V919; V918= (V916); V919= CMPcar((V918)); goto T2173; T2173:; if(!(((V9...
false
false
false
false
false
0
browsebutton_cb(Fl_Button *, savespect *panel) { const char *currentfile; static const char *p = 0; dbgprintf("Browse button pressed on save prefs panel\n"); currentfile = panel->filenameInputValue(); switch (panel->selectedFileFormat()) { case EURO_FMT: p = fl_file_chooser("Save to...
false
false
false
false
false
0
ssl3_new(SSL *s) { SSL3_STATE *s3; if ((s3=OPENSSL_malloc(sizeof *s3)) == NULL) goto err; memset(s3,0,sizeof *s3); memset(s3->rrec.seq_num,0,sizeof(s3->rrec.seq_num)); memset(s3->wrec.seq_num,0,sizeof(s3->wrec.seq_num)); s->s3=s3; #ifndef OPENSSL_NO_SRP SSL_SRP_CTX_init(s); #endif s->method->ssl_clear(s); ...
false
false
false
false
false
0
stp_xml_init_defaults(void) { stp_list_item_t *item; /* Pointer to current list item */ stp_xml_init(); /* Parse each XML file */ item = stp_list_get_start(stpi_xml_preloads); while (item) { stp_deprintf(STP_DBG_XML, "stp_xml_init_defaults: source file: %s\n", (const char *) s...
false
false
false
false
true
1
xml_file_put_xml_decl(FILE *fp) { cm_return_val_if_fail(fp != NULL, -1); XML_STRING_TABLE_CREATE(); return fprintf(fp, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", CS_INTERNAL); }
false
false
false
false
false
0
matchbracketclass (int c, char *p, char *end) { int sig = 1; if (*(p+1) == '^') { sig = 0; p++; /* skip the '^' */ } while (++p < end) { if (*p == ESC) { p++; if ((p < end) && matchclass(c, (unsigned char)*p)) return sig; } else if ((*(p+1) == '-') && (p+2 < end)) { ...
false
false
false
false
false
0
constr_expr_state_get_cur(const qpol_iterator_t * iter) { constr_expr_state_t *ces = NULL; if (!iter || !(ces = (constr_expr_state_t *) qpol_iterator_state(iter)) || qpol_iterator_end(iter)) { errno = EINVAL; return NULL; } return ces->cur; }
false
false
false
false
false
0
bus_dbus_impl_list_names (BusDBusImpl *dbus, BusConnection *connection, GVariant *parameters, GDBusMethodInvocation *invocation) { GVariantBuilder builder; g_variant_builder_init (&builder, G_VARIANT_TYP...
false
false
false
false
false
0
bqinput(const char *sep, int fd) { long n; char in[BUFSIZE]; startsplit(sep, TRUE); restart: while ((n = eread(fd, in, sizeof in)) > 0) splitstring(in, n, FALSE); SIGCHK(); if (n == -1) { if (errno == EINTR) goto restart; close(fd); fail("$&backquote", "backquote read: %s", esstrerror(errno)); } ret...
false
false
false
false
false
0
png_progressive_combine_row (png_structp png_ptr, png_bytep old_row, png_bytep new_row) { #ifdef PNG_USE_LOCAL_ARRAYS PNG_CONST int FARDATA png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; #endif if (png_ptr == NULL) return; if (new_row != NULL) /* new_row must == png_ptr-...
false
false
false
false
false
0
cost(int data_load_cost, int data_store_cost, int ldata_load_cost, int ldata_store_cost, char *cost_arch, char *cost_file ) { Module_table* mptr; int module_number; DATA_LOAD_COST = data_load_cost; DATA_STORE_COST = data_store_cost; LDATA_LOAD_COST = ldata_load_cost; LDATA_STORE...
false
false
false
false
false
0
goo_canvas_item_accessible_get_parent (AtkObject *accessible) { GooCanvasItem *item, *parent; GooCanvas *canvas; GObject *object; g_return_val_if_fail (GOO_IS_CANVAS_ITEM_ACCESSIBLE (accessible), NULL); if (accessible->accessible_parent) return accessible->accessible_parent; object = atk_gobject_acce...
false
false
false
false
false
0
functional_constraint(BaseType &var, DDS &dds, ConstraintEvaluator &eval, FILE *out) const { ostringstream oss; functional_constraint(var, dds, eval, oss); fwrite(oss.str().data(), sizeof(char), oss.str().length(), out); }
false
false
false
false
false
0
xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id, union xhci_trb *trb, u32 cmd_comp_code) { unsigned int ep_index; unsigned int stream_id; struct xhci_ring *ep_ring; struct xhci_virt_device *dev; struct xhci_virt_ep *ep; struct xhci_ep_ctx *ep_ctx; struct xhci_slot_ctx *slot_ctx; ep_index = TRB_TO_...
false
false
false
false
false
0
getTempDirectory(){ #ifndef WIN32 const FXchar* dir; if((dir=getenv("TMPDIR"))!=NULL){ return FXString(dir); } return FXString("/tmp"); #else TCHAR buffer[MAXPATHLEN]; DWORD len=GetTempPath(MAXPATHLEN,buffer); if(1<len && ISPATHSEP(buffer[len-1]) && !ISPATHSEP(buffer[len-2])) len--; return FXStrin...
false
false
false
false
false
0
s_combo_apply_changes(GtkComboBox * combo, _wd * wd) { const char *text; // TODO Rob: move this into ev_UnixFontCombo gchar *buffer = NULL; GtkTreeModel *model = gtk_combo_box_get_model (combo); if (GTK_IS_TREE_MODEL_SORT (model)) { GtkTreeIter sort_iter; gtk_combo_box_get_active_iter (combo, &sort_it...
false
false
false
false
false
0
_find_formatter_asset_for_uri (const gchar * uri) { GESFormatterClass *class = NULL; GList *formatter_assets, *tmp; GESAsset *asset = NULL; formatter_assets = g_list_sort (ges_list_assets (GES_TYPE_FORMATTER), (GCompareFunc) _sort_formatters); for (tmp = formatter_assets; tmp; tmp = tmp->next) { GE...
false
false
false
false
false
0
bogus_utf8_command(char *cmd, char *help) { q_status_message4(SM_ORDER, 0, 2, "Command \"%s\" not defined for this screen.%s%s%s", cmd ? cmd : "?", (help) ? " Use " : "", (help) ? help : "", (help) ? " for help" : ""); }
false
false
false
false
false
0
fmtStrFlush(Fmt *f) { char *s; int n; if(f->start == nil) return 0; n = (uintptr)f->farg; n *= 2; s = (char*)f->start; f->start = realloc(s, n); if(f->start == nil){ f->farg = nil; f->to = nil; f->stop = nil; free(s); return 0; } f->farg = (void*)(uintptr)n; f->to = (char*)f->start + ((char*)f->...
false
false
false
false
false
0
loc_cpy(loc, mod_access) struct val_loc *loc; int mod_access; { struct val_loc *new_loc; if (loc == NULL) return NULL; new_loc = NewStruct(val_loc); *new_loc = *loc; new_loc->mod_access = mod_access; return new_loc; }
false
false
false
false
false
0
COLOURS_EXTERNAL_Read(COLOURS_EXTERNAL_t *colours) { FILE *fp; int i; unsigned char *pal_ptr; fp = fopen(colours->filename, "rb"); if (fp == NULL) { colours->loaded = FALSE; return FALSE; } for (i = 0, pal_ptr = colours->palette; i < 768; i++) { int c = fgetc(fp); if (c == EOF) { fclose(fp); colou...
false
true
false
false
true
1
ArSimulatedGPS(ArRobot *robot) : ArGPS(), myHaveDummyPosition(false), mySimStatHandlerCB(this, &ArSimulatedGPS::handleSimStatPacket), myRobot(robot) { myData.havePosition = false; myData.fixType = NoFix; // need to set a position with setDummyPosition() or get data from MobileSim to get a (simulated...
false
false
false
false
false
0
toFull (gunichar ch) { for (guint i = 0; i < G_N_ELEMENTS (m_table); i++) { if (G_UNLIKELY (ch < m_table[i][0])) return ch; if (G_UNLIKELY (ch < m_table[i][0] + m_table[i][2])) return ch - m_table[i][0] + m_table[i][1]; } return ch; }
false
false
false
false
false
0
g3_rotate_vertex_popped(vertex *dest,vec3d *src) { vec3d tempv; Assert( G3_count == 1 ); Assert( instance_depth > 0 ); vm_vec_sub(&tempv,src,&instance_stack[0].p); vm_vec_rotate( &dest->world, &tempv, &instance_stack[0].m ); dest->flags = 0; //not projected return g3_code_vertex(dest); }
false
false
false
false
false
0
ConfigBufferingCmd( PLStream *pls, PLBufferingCB *ptr ) { XwDev *dev = (XwDev *) pls->dev; switch (ptr->cmd) { case PLESC_DOUBLEBUFFERING_ENABLE: dev->write_to_window = 0; pls->db = 1; break; case PLESC_DOUBLEBUFFERING_DISABLE: dev->write_to_window = 1; pls->db = 0; break; case PLESC_DOUBL...
false
false
false
false
false
0
hpijs_get_client_raster(IjsServerCtx *ctx, char *buf, int size, char white) { int status, clean=1, i; status = ijs_server_get_data(ctx, (char *)buf, size); if (status < 0) return status; /* error */ /* Check for blank raster. */ for (i = 0; i < size; i++) { if (buf[i] != white) {...
false
false
false
false
false
0
entry_insert_numeric(GtkWidget *entry, gchar *text, gint length) { gint count; if (length == -1) length = strlen(text); count = 0; while (count < length) { if (!isdigit(*(text + count)) && !(*(text + count) == '.')) { g_signal_stop...
false
false
false
false
false
0
crvml_nearest_index(const struct vml_sys *sys, int clock) { int i; int cur_index = 0; int cur_diff; int diff; cur_diff = clock - crvml_clocks[0]; cur_diff = (cur_diff < 0) ? -cur_diff : cur_diff; for (i = 1; i < crvml_num_clocks; ++i) { diff = clock - crvml_clocks[i]; diff = (diff < 0) ? -diff : diff; if ...
false
false
false
false
false
0
xkl_engine_stop_listen(XklEngine * engine, guint what) { int i; gboolean no_flags_remains = TRUE; guchar *cntr = xkl_engine_priv(engine, listener_type_counters); for (i = 0; i < XKLL_NUMBER_OF_LISTEN_MODES; i++, cntr++) { int mask = 1 << i; if (what & mask) (*cntr)--; if (*cntr) no_flags_remains = FALS...
false
false
false
false
false
0
read_setting_fontspec(void *handle, const char *name, FontSpec *result) { /* * In GTK1-only PuTTY, we used to store font names simply as a * valid X font description string (logical or alias), under a * bare key such as "Font". * * In GTK2 PuTTY, we have a prefix system where "client:" ...
false
true
false
false
false
1
ajFileNewOutNamePathS(const AjPStr name, const AjPStr path) { AjPFile thys; ajDebug("ajFileNewOutNamePathS('%S' '%S')\n", path, name); if(ajStrMatchC(name, "stdout")) return ajFileNewFromCfile(stdout); if(ajStrMatchC(name, "stderr")) return ajFileNewFromCfile(stderr); AJNEW0(thys...
false
false
false
false
true
1
e_container_shape_geometry_get(E_Container_Shape *es, int *x, int *y, int *w, int *h) { E_OBJECT_CHECK(es); E_OBJECT_TYPE_CHECK(es, E_CONTAINER_SHAPE_TYPE); if (x) *x = es->x; if (y) *y = es->y; if (w) *w = es->w; if (h) *h = es->h; }
false
false
false
false
false
0
ali_warn_atapi_dma(struct ata_device *adev) { struct ata_eh_context *ehc = &adev->link->eh_context; int print_info = ehc->i.flags & ATA_EHI_PRINTINFO; if (print_info && adev->class == ATA_DEV_ATAPI && !ali_atapi_dma) { ata_dev_warn(adev, "WARNING: ATAPI DMA disabled for reliability issues. It can be enab...
false
false
false
false
false
0
gl_label_is_selection_atomic (glLabel *label) { GList *p; glLabelObject *object; gint n_selected = 0; for ( p = label->priv->object_list; p != NULL; p = p->next ) { object = GL_LABEL_OBJECT (p->data); if ( gl_label_object_...
false
false
false
false
false
0
bnx2x_vf_handle_classification_eqe(struct bnx2x *bp, struct bnx2x_vf_queue *vfq, union event_ring_elem *elem) { unsigned long ramrod_flags = 0; int rc = 0; /* Always push next commands out, don't wait here */ set_bit(RAMROD_CONT, &ramrod_flags); switch (elem->message.data.eth_event.echo >> BNX2X_SWCID_...
false
false
false
false
false
0
pipelinedResponse(int result, string message) { switch (result / 100) { case 1: case 2: case 3: break; default: if (pipelineError.size() == 0) pipelineError=sendQueue.front().messageInfo .recipients[rcptCount] + ": " + message; break; } ++rcptCount; if (--pipelineCount || fatalError) return; // ...
false
false
false
false
false
0
gel_pop_file_info(void) { GSList *li; g_assert(curfile && curline); li = curfile; curfile = g_slist_remove_link(curfile,curfile); g_free(li->data); g_slist_free_1(li); li = curline; curline = g_slist_remove_link(curline,curline); g_slist_free_1(li); }
false
false
false
false
false
0
ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type) { if (AR_SREV_9300_20_OR_LATER(ah)) { REG_WRITE(ah, AR_WA, ah->WARegVal); udelay(10); } REG_WRITE(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN | AR_RTC_FORCE_WAKE_ON_INT); switch (type) { case ATH9K_RESET_POWER_ON: return ath9k_hw_set_reset_power_on(ah...
false
false
false
false
false
0
rcSibUpdate_ht(struct ath_softc_tgt *sc, struct ath_node_target *an, A_UINT32 capflag, A_BOOL keepState, struct ieee80211_rate *pRateSet) { RATE_TABLE_11N *pRateTable = 0; struct atheros_node *pSib = ATH_NODE_ATHEROS(an); struct atheros_softc *asc = (struct atheros_softc*)sc->sc_rc; A_UINT8 *phtMcs = (A_UI...
false
false
false
false
false
0
getLine(FILE *file) { char *tmp, in; int cnt = 0, retIn; if (feof(file)) { return NULL; } else { tmp = g_malloc(sizeof(char) * MAX_BUFF); retIn = fread((void *) &in, sizeof(char), 1, file); if (retIn != 1) { g_free(tmp); return NULL; } while ((in != '\n') && (cnt < MAX_BUFF)) { tmp[cnt] = in;...
false
false
false
false
false
0
dump_word(slang, word, pat, dir, dumpflags, wordflags, lnum) slang_T *slang; char_u *word; char_u *pat; int *dir; int dumpflags; int wordflags; linenr_T lnum; { int keepcap = FALSE; char_u *p; char_u *tw; char_u cword[MAXWLEN]; char_u badword[MAXWLEN + 10]; int i...
false
false
false
false
false
0
mx_application_constructed (GObject *object) { MxSettings *settings; MxApplication *self = MX_APPLICATION (object); MxApplicationPrivate *priv = self->priv; gboolean success = FALSE; #if defined (HAVE_STARTUP_NOTIFICATION) && defined (HAVE_X11) SnDisplay *display; Display *xdisplay; int screen; #endif ...
false
false
false
false
false
0
normal_sort_tab_page_sort(NormalSortTabPage *self, enum GtkPodSortTypes order) { g_return_if_fail(NORMAL_SORT_TAB_IS_PAGE(self)); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(self)); if (order != SORT_NONE) gtk_tree_sortable_set_sort_column_id( GTK_TREE_SORTABLE (mode...
false
false
false
false
false
0
png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) { png_debug(1, "in png_do_pack"); if (row_info->bit_depth == 8 && row_info->channels == 1) { switch ((int)bit_depth) { case 1: { png_bytep sp, dp; int mask, v; png_...
false
false
false
false
false
0
Raise_IdxError(SQObject &o) { SQObjectPtr oval = PrintObjVal(o); Raise_Error(_SC("the index '%.50s' does not exist"), _stringval(oval)); }
false
false
false
false
false
0
time_after(struct timeval *last, struct timeval *tout, struct timeval *now) { if (now->tv_sec > last->tv_sec + tout->tv_sec) return 1; if (now->tv_sec == last->tv_sec + tout->tv_sec) { if (now->tv_usec > last->tv_usec + tout->tv_usec) return 1; } return 0; }
false
false
false
false
false
0
InternalDeepCopy(vtkAbstractTransform *transform) { vtkGridTransform *gridTransform = (vtkGridTransform *)transform; this->SetInverseTolerance(gridTransform->InverseTolerance); this->SetInverseIterations(gridTransform->InverseIterations); this->SetInterpolationMode(gridTransform->InterpolationMode); this->In...
false
false
false
false
false
0
operator const char *() const throw(SettingTypeException) { assertType(TypeString); return(config_setting_get_string(_setting)); }
false
false
false
false
false
0
__mark_block_processed(struct reloc_control *rc, struct backref_node *node) { u32 blocksize; if (node->level == 0 || in_block_group(node->bytenr, rc->block_group)) { blocksize = rc->extent_root->nodesize; mark_block_processed(rc, node->bytenr, blocksize); } node->processed = 1; }
false
false
false
false
false
0
initGem() { static int alreadyInit = 0; if (alreadyInit) return; alreadyInit = 1; // clear the light array for (int i = 0; i < NUM_LIGHTS; i++) s_lights[i] = 0; m_clear_color[0] = 0.0; m_clear_color[1] = 0.0; m_clear_color[2] = 0.0; m_clear_color[3] = 0.0; m_mat_ambient[0] = 0.0f; ...
false
false
false
false
false
0
sysfs_devno_is_wholedisk(dev_t devno) { dev_t disk; if (sysfs_devno_to_wholedisk(devno, NULL, 0, &disk) != 0) return -1; return devno == disk; }
false
false
false
false
false
0
traverse_children (GNode *node, gpointer data) { TraverseClosure *closure = data; ClutterScoreEntry *entry = node->data; gboolean retval = FALSE; /* root */ if (!entry) return TRUE; switch (closure->action) { case FIND_BY_TIMELINE: if (closure->d.timeline == entry-...
false
false
false
false
false
0
ompi_osc_rdma_frag_flush_all(ompi_osc_rdma_module_t *module) { int ret = OMPI_SUCCESS; int i; ompi_osc_rdma_frag_t *frag, *next; OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output, "osc rdma: frag flush all begin")); /* flush the active frag */ for (i = ...
false
false
false
false
false
0
copy_union() { FILE *dc_file; register int c; int depth; int u_lineno = lineno; char *u_line = dup_line(); char *u_cptr = u_line + (cptr - line - 6); if (unionized) over_unionized(cptr - 6); unionized = 1; if (!lflag) fprintf(text_file, line_format, lineno, (inc_file?inc_file_name...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__com__Array_RemoveAll(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__com__Array * __ecerePointer___ecereNameSpace__ecere__com__Array = (struct __ecereNameSpace__ecere__com__Array *)(this ? (((char *)this) + 12) : 0); if(__ecerePointer___ece...
false
false
false
true
false
1
main ( int argc, char **argv ) { int r = 1; const char * listen_host = "::1"; const char * listen_port = "10000"; struct addrinfo *listen_ai = 0; if ( argc == 2 && strcmp ( "--help", argv[1] ) == 0 ) { fprintf ( stdout, "usage:\n\t%s {local ip} {local port}\ndefaults to: %s %s\n", ...
false
false
false
false
false
0
ftrace_startup_sysctl(void) { int command; if (unlikely(ftrace_disabled)) return; /* Force update next time */ saved_ftrace_func = NULL; /* ftrace_start_up is true if we want ftrace running */ if (ftrace_start_up) { command = FTRACE_UPDATE_CALLS; if (ftrace_graph_active) command |= FTRACE_START_FUNC_RE...
false
false
false
false
false
0
make_dirs(char *filename) { char *dirname,*h; int retval = -1; dirname = strdup(filename); if (NULL == dirname) goto done; h = strrchr(dirname,'/'); if (NULL == h) goto done; *h = 0; if (-1 == (retval = mkdir(dirname,0777))) if (ENOENT == errno) if (0 == make_dirs(dirname)) r...
false
false
false
false
false
0
snd_rme32_playback_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { int err, rate, dummy; struct rme32 *rme32 = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; if (rme32->fullduplex_mode) { err = snd_pcm_lib_malloc_pages(substream...
false
false
false
false
false
0
setModified(bool modified) { if (!modified) m_OriginalValue = storableData().toDouble(); }
false
false
false
false
false
0
dc_lcb_read( struct vsp_node * node, char *buf, ssize_t len) { local_cache_buffer_t *lb = node->lcb; ssize_t total_copied=0, bytes_copied=0; struct read_request request_storage, *request = &request_storage; current_fd = node->dataFd; build_request(request, node, buf, len); if ( is_first_ever_...
false
false
false
false
false
0
DHPt3Dot(point4 v0, point4 v1, int metric) { switch (metric) { case DG_EUCLIDEAN: return(v0[0]*v1[0] + v0[1]*v1[1] + v0[2]*v1[2] + v0[3]*v1[3]); break; case DG_HYPERBOLIC: return(v0[0]*v1[0] + v0[1]*v1[1] + v0[2]*v1[2] - v0[3]*v1[3]); break; case DG_SPHERICAL: return(v0[0]*v1[0] + v0[1]*...
false
false
false
false
false
0
Setup_AF_UNIX(void) { /* Arrange to unlink the socket file at exit */ on_proc_exit(StreamDoUnlink, 0); /* * Fix socket ownership/permission if requested. Note we must do this * before we listen() to avoid a window where unwanted connections could * get accepted. */ Assert(Unix_socket_group); if (Unix_soc...
false
false
false
false
true
1
gl843_update_hardware_sensors (Genesys_Scanner * s) { /* do what is needed to get a new set of events, but try to not lose any of them. */ SANE_Status status = SANE_STATUS_GOOD; uint8_t val; RIE (sanei_genesys_read_register (s->dev, REG6D, &val)); if (s->dev->model->gpo_type == GPO_KVSS080) { ...
false
false
false
false
false
0
addProperty(const wxString& name, const wxString& value) { wxStaticText* staticText = new wxStaticText( m_scrolledWindow, wxID_ANY, name, wxDefaultPosition, wxDefaultSize, 0 ); staticText->Wrap( -1 ); m_gbSizer->Add( staticText, wxGBPosition( m_current_row, 0 ), wxGBSpan( 1, 1 ), wxALL, 3 ); s...
false
false
false
false
false
0
skype_set_public_alias(PurpleConnection *gc, const char *alias, _account_char_fn success_cb, _account_char_fn failure_cb) { struct _skype_account_alias_cb *info; if (alias && *alias) { skype_send_message_nowait("SET PROFILE FULLNAME %s", alias); if (success_cb) { info = g_new0(struct _skype_account_alias_...
false
false
false
false
false
0
UpdateAuxDisplay(cpw) AuxPanelWidget cpw; { Widget dispobj = cpw->cpanel.displayobj; DisplaySegment *dseg; int hspace, vspace; int x, y; Cardinal i; if (dispobj == NULL) return; hspace = cpw->cpanel.hspace; vspace = cpw->cpanel.vspace; x = hspace / 2; y = vspace / 2; for (i = 0, dseg = cpw->cp...
false
false
false
false
false
0
GetReceiverMapsForStub(Code* stub, MapList* result) { ASSERT(stub->is_inline_cache_stub()); if (stub == string_stub()) { return result->Add(isolate()->heap()->string_map()); } else if (stub->is_keyed_load_stub() || stub->is_keyed_store_stub()) { if (stub->ic_state() == MONOMORPHIC) { result->Add(Map...
false
false
false
false
false
0
GdipSetLineBlend (GpLineGradient *brush, GDIPCONST float *blend, GDIPCONST float *positions, int count) { float *blendFactors; float *blendPositions; int index; if (!brush || !blend || !positions || (count < 2)) return InvalidParameter; if (brush->blend->count != count) { blendFactors = (float *) GdipAlloc (...
false
false
false
false
false
0
Jam_CallVoidMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { va_list jargs; MethodBlock *mb; Object *ob = REF_TO_OBJ(obj); va_start(jargs, methodID); if((mb = lookupVirtualMethod(ob, methodID)) != NULL) executeMethodVaList(ob, ob->class, mb, jargs); va_end(jargs); }
false
false
false
false
false
0
defer_full_frame(struct iax2_thread *from_here, struct iax2_thread *to_here) { struct iax2_pkt_buf *pkt_buf, *cur_pkt_buf; struct ast_iax2_full_hdr *fh, *cur_fh; if (!(pkt_buf = ast_calloc(1, sizeof(*pkt_buf) + from_here->buf_len))) return; pkt_buf->len = from_here->buf_len; memcpy(pkt_buf->buf, from_here->buf...
false
true
false
false
false
1
createImpl(const String& name, ResourceHandle handle, const String& group, bool isManual, ManualResourceLoader* loader, GpuProgramType gptype, const String& syntaxCode) { ProgramMap::const_iterator iter = mProgramMap.find(syntaxCode); if(iter == mProgramMap.end()) ...
false
false
false
false
false
0
ena_com_init_io_sq(struct ena_com_dev *ena_dev, struct ena_com_create_io_ctx *ctx, struct ena_com_io_sq *io_sq) { size_t size; int dev_node = 0; memset(&io_sq->desc_addr, 0x0, sizeof(io_sq->desc_addr)); io_sq->desc_entry_size = (io_sq->direction == ENA_COM_IO_QUEUE_DIRECTION_TX) ? sizeof(str...
false
false
false
false
false
0
selection_changed_cb(GtkFileChooser * file_chooser, void *UNUSED(notused)) { const char *label; char *buf; char *filename = gtk_file_chooser_get_filename(file_chooser); FilePreviewData *fpd = ReadFilePreview(filename); int openable = FALSE; if (!fpd) { lastOpenType = N_IMPORT_TYPES; ...
false
false
false
false
false
0
xfrm_algo_parse(struct xfrm_algo *alg, enum xfrm_attr_type_t type, char *name, char *key, char *buf, int max) { int len; int slen = strlen(key); #if 0 /* XXX: verifying both name and key is required! */ fprintf(stderr, "warning: ALGO-NAME/ALGO-KEYMAT values will be sent to the kernel promiscuously! (verifyin...
false
false
false
false
false
0
amdlibAllocateOiTarget(amdlibOI_TARGET *target, const int nbElements) { amdlibLogTrace("amdlibAllocateOiTarget()"); /* First free previous allocated memory */ if (target->thisPtr == target) { amdlibFreeOiTarget(target); } /* Init da...
false
false
false
false
false
0
PrintMouseState(const SEvent& event, stringw &result) { result += stringw(L"X: "); result += stringw(event.MouseInput.X); result += stringw(L"\n"); result += stringw(L"Y: "); result += stringw(event.MouseInput.Y); result += stringw(L"\n"); result += stringw(L"Wheel: "); result += stringw(event.Mo...
false
false
false
false
false
0
wdivmod(wideval_t wn, wideval_t wd, wideval_t *wq, wideval_t *wr) { VALUE tmp, ary; #if WIDEVALUE_IS_WIDER if (FIXWV_P(wn) && FIXWV_P(wd)) { wideint_t n, d, q, r; d = FIXWV2WINT(wd); if (d == 0) rb_num_zerodiv(); if (d == 1) { *wq = wn; *wr = WINT2FIXWV(0)...
false
false
false
false
false
0
capidtmf_recv_enable(t_capidtmf_state *p_state, word min_digit_duration, word min_gap_duration) { p_state->recv.indication_state_ack &= CAPIDTMF_RECV_INDICATION_DIGIT; p_state->recv.min_digit_duration = (word)(((((dword) min_digit_duration) * 8) + ((dword)(CAPIDTMF_RECV_TIME_GRANULARITY / 2))) / ((dword) CAP...
false
false
false
false
false
0
waitForThemeBackground() { if (background_loader.isRunning()) { background_loader.wait(); repaint(); } }
false
false
false
false
false
0
gfs_l_gfork_opts_kmgint( const char * arg, globus_off_t * out_i) { int i; int sc; GFSGForkFuncName(gfs_l_gfork_opts_kmgint); sc = sscanf(arg, "%d", &i); if(sc != 1) { retu...
false
false
false
false
false
0
PyvtkKdTree_ViewOrderAllRegionsFromPosition(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ViewOrderAllRegionsFromPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkKdTree *op = static_cast<vtkKdTree *>(vp); double temp0[3]; const int size0 = 3; vtkIntArray *temp1 = NULL; ...
false
false
false
false
false
0
Make_MGRS_String (char* MGRS, long Zone, int Letters[MGRS_LETTERS], double Easting, double Northing, long Precision) /* * The function Make_MGRS_String constructs an MGRS string * from its component...
false
false
false
false
false
0
satipc_rtcp_reply(sockets * s) { unsigned char *b = s->buf, *ver, *signal; char *tun; int i, rlen = s->rlen; adapter *ad; satipc *sip; get_ad_and_sipr(s->sid, 0); int strength, status, snr; uint32_t rp; s->rlen = 0; // LOG("satip_rtcp_reply called"); if (b[0] == 0x80 && b[1] == 0xC8) { copy32r(rp, b, 20);...
false
false
false
false
false
0
CheckAndFixGlyphAttrsInRules(GrcManager * pcman, std::vector<GdlGlyphClassDefn *> & vpglfcInClasses, int irit) { char rgchItem[20]; itoa(irit+1, rgchItem, 10); if (m_psymName->FitsSymbolType(ksymtGlyphAttr) && !m_psymName->FitsSymbolType(ksymtSlotAttr)) // treat it like a slot attribute { // if it co...
false
false
false
false
false
0
hmap_removeON(CTX ctx, kmapptr_t* m, ksfp_t *ksfp) { knh_hmap_t *hmap = (knh_hmap_t*)m; kObject *key = ksfp[0].o; khashcode_t hcode = O_cTBL(key)->cdef->hashCode(ctx, ksfp[0].p); knh_hentry_t *e = hmap_getentry(hmap, hcode); while(e != NULL) { if(e->hcode == hcode && knh_Object_compareTo(key, e->key) == 0) { ...
false
false
false
false
false
0
ParseRequest(QByteArray &raw_data) { if(_parsed) { qFatal("Cannot reparse request!"); } _parsed = true; qDebug("Starting to parse"); int len = raw_data.length(); int bytes_proc = http_parser_execute(&_parser, &_parser_settings, raw_data.constData(), len); if(bytes_proc != ra...
false
false
false
false
false
0
ParseFlagString(char *flagstring,u_long *plusmask,u_long *minusmask) { char *sp, *next; int clear; u_long value; value = 0; if (flagstring == NULL) { return; } Debug1("ParseFlagString(%s)\n",flagstring); for ( sp = flagstring; sp && *sp; sp = next ) { if ( next = strchr( sp, ',' )) ...
false
false
false
true
false
1
do_enter(const char *func_name) { const string s = func_name; TCallData &d = m_data[s]; d.n_calls++; d.open_calls.push(0); // Dummy value, it'll be written below d.open_calls.top() = m_tictac.Tac(); // to avoid possible delays. }
false
false
false
false
false
0
oc_strnlen(const char *s, size_t maxlen) { return min(strlen(s), maxlen); }
false
false
false
false
false
0
DC16(uint8_t* dst) { // DC const __m128i zero = _mm_setzero_si128(); const __m128i top = _mm_loadu_si128((const __m128i*)(dst - BPS)); const __m128i sad8x2 = _mm_sad_epu8(top, zero); // sum the two sads: sad8x2[0:1] + sad8x2[8:9] const __m128i sum = _mm_add_epi16(sad8x2, _mm_shuffle_epi32(sad8x2, 2)); in...
false
false
false
false
false
0
acpi_video_device_lcd_query_levels(struct acpi_video_device *device, union acpi_object **levels) { int status; struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *obj; *levels = NULL; status = acpi_evaluate_object(device->dev->handle, "_BCL", NULL, &buffer); if (!ACPI_SUCCESS(...
false
false
false
false
false
0
draw_pt_emit_prepare(struct pt_emit *emit, unsigned prim, unsigned *max_vertices) { struct draw_context *draw = emit->draw; const struct vertex_info *vinfo; unsigned dst_offset; struct translate_key hw_key; unsigned i; /* XXX: need to flush to get prim_vbuf.c...
false
false
false
false
false
0
hvc_get_by_index(int index) { struct hvc_struct *hp; unsigned long flags; spin_lock(&hvc_structs_lock); list_for_each_entry(hp, &hvc_structs, next) { spin_lock_irqsave(&hp->lock, flags); if (hp->index == index) { tty_port_get(&hp->port); spin_unlock_irqrestore(&hp->lock, flags); spin_unlock(&hvc_stru...
false
false
false
false
false
0