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
evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len) { DATA32 *src_ptr, *dst_ptr, *dst_end_ptr; dst_end_ptr = dst + len; dst_end_ptr -= 15; src_ptr = src; dst_ptr = dst; while (dst_ptr < dst_end_ptr) { MOVE_16DWORDS_MMX2(src_ptr, dst_ptr); src_ptr+=16; dst_ptr+=16; } dst_end...
false
false
false
false
false
0
first() const { register FXint pos=0; while(pos<total){ if(0<=dict[pos].hash) break; pos++; } FXASSERT(total<=pos || 0<=dict[pos].hash); return pos; }
false
false
false
false
false
0
check_xrecord_reset(int force) { static double last_reset = 0.0; int reset_time = 60, require_idle = 10; int reset_time2 = 600, require_idle2 = 40; double now = 0.0; XErrorHandler old_handler = NULL; if (gdpy_ctrl) { X_LOCK; check_xrecord_grabserver(); X_UNLOCK; } else { /* more dicey if not watching ...
false
false
false
false
false
0
clutter_get_font_flags (void) { CoglPangoFontMap *font_map = NULL; const cairo_font_options_t *font_options; ClutterFontFlags flags = 0; cairo_hint_style_t hint_style; font_map = clutter_context_get_pango_fontmap (); if (cogl_pango_font_map_get_use_mipmapping (font_map)) flags |= CLUTTER_FONT_MIPMAPPIN...
false
false
false
false
false
0
xim_queue_key_press_event(GdkEventKey *event, int down) { if (down) { /* * Workaround GTK2 XIM 'feature' that always converts keypad keys to * chars., even when not part of an IM sequence (ref. feature of * gdk/gdkkeyuni.c). * Flag any keypad keys that might represent a single char. * If this (on its...
false
false
false
false
false
0
z_div( zword_t a, zword_t b ) { /* The magic rule is: round towards zero. */ ZINT16 sa = ( ZINT16 ) a; ZINT16 sb = ( ZINT16 ) b; ZINT16 res; if ( sb < 0 ) { sa = -sa; sb = -sb; } if ( sb == 0 ) { #ifdef STRICTZ report_strictz_error( STRZERR_DIV_ZERO, ...
false
false
false
false
false
0
str_MatchCount(char *a,char *b) { if(a==NULL || b==NULL) return(0); long i=0; long alen=strlen(a); long blen=strlen(b); long match_max_len = alen; if(blen<match_max_len) match_max_len=blen; for(i=0;i<match_max_len;i++) { if(a[i]!=b[i]) return(i); } return(match_max_l...
false
false
false
false
false
0
expand_decl_init (decl) tree decl; { int was_used = TREE_USED (decl); /* If this is a CONST_DECL, we don't have to generate any code. Likewise for static decls. */ if (TREE_CODE (decl) == CONST_DECL || TREE_STATIC (decl)) return; /* Compute and store the initial value now. */ push_te...
false
false
false
false
false
0
my_numbox_free(t_my_numbox *x) { if(x->x_gui.x_fsf.x_rcv_able) pd_unbind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); clock_free(x->x_clock_reset); clock_free(x->x_clock_wait); gfxstub_deleteforkey(x); }
false
false
false
false
false
0
do_ac() { if (using_ac_eval()) { ac_eval(); if (_ev == 0.) { error(bPICKY, long_label() + ": short circuit\n"); _ev = OPT::shortckt; }else{ } _acg = 1. / _ev; }else{ assert(_ev == _y[0].f1); assert(has_tr_eval() || _ev == double(value()) || _ev == OPT::shortckt); } }
false
false
false
false
false
0
compare(const DcmElement& rhs) const { int result = DcmElement::compare(rhs); if (result != 0) { return result; } /* cast away constness (dcmdata is not const correct...) */ DcmSignedLong* myThis = NULL; DcmSignedLong* myRhs = NULL; myThis = OFconst_cast(DcmSignedLong*, this); ...
false
false
false
false
false
0
from_char_set_int(int *dest, const int value, const FormatNode *node) { if (*dest != 0 && *dest != value) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), errmsg("conflicting values for \"%s\" field in formatting string", node->key->name), errdetail("This value contradicts a previous set...
false
false
false
false
false
0
_snd_pcm_share_slave_forward(snd_pcm_share_slave_t *slave) { struct list_head *i; snd_pcm_uframes_t buffer_size, boundary; snd_pcm_uframes_t slave_appl_ptr; snd_pcm_sframes_t frames, safety_frames; snd_pcm_sframes_t min_frames, max_frames; snd_pcm_uframes_t avail, slave_avail; snd_pcm_uframes_t slave_hw_avail; ...
false
false
false
false
false
0
gel_apply_func_to_matrix (GelCtx *ctx, GelETree *mat, GelBIFunction function, const char *ident, gboolean *exception) { GelMatrixW *m; GelMatrixW *new; GelETree *n; int i, j, w, h; gboolean internal_exception = FALSE; m = mat->mat.matrix; w = gel_matrixw_width(m); h = gel_matrixw_height...
false
false
false
false
false
0
AppendTarget(cmGeneratedFileStream& fout, const char* targetName, cmTarget* target, const char* make, const cmMakefile* makefile, ...
false
false
false
false
false
0
enableSocks() { if (d->_hasSocks) d->_useSocks = true; }
false
false
false
false
false
0
set_device_enabled (int device_id, gboolean enabled) { Atom prop; guchar value; prop = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "Device Enabled", False); if (!prop) return FALSE; gdk_error_trap_push (); value =...
false
false
false
false
false
0
snd_mts64_module_init(void) { int err; if ((err = platform_driver_register(&snd_mts64_driver)) < 0) return err; if (parport_register_driver(&mts64_parport_driver) != 0) { platform_driver_unregister(&snd_mts64_driver); return -EIO; } if (device_count == 0) { snd_mts64_unregister_all(); return -ENODEV; ...
false
false
false
false
false
0
gwy_selection_set_max_objects_default(GwySelection *selection, guint max_objects) { guint object_size; gwy_debug("%d", max_objects); g_return_if_fail(max_objects >= 1); object_size = GWY_SELECTION_GET_CLASS(selection)->object_size; if (max_objects*object_size =...
false
false
false
false
false
0
expire_reflog_ent(unsigned char *osha1, unsigned char *nsha1, const char *email, unsigned long timestamp, int tz, const char *message, void *cb_data) { struct expire_reflog_cb *cb = cb_data; struct commit *old, *new; if (timestamp < cb->cmd->expire_total) goto prune; old = new = NULL; if (cb->cmd->stalefix...
false
false
false
false
false
0
pca9534_init_port_expander(struct mxl111sf_state *state) { u8 w[2] = { 1, 0x07 }; /* write protect enabled, signal LEDs off */ struct i2c_msg msg = { .addr = PCA9534_I2C_ADDR, .flags = 0, .buf = w, .len = 2 }; mxl_debug("()"); i2c_transfer(&state->d->i2c_adap, &msg, 1); /* configure all pins as outputs */...
false
false
false
false
false
0
addmodel_colour(model_colour **p_model_colours,char *name, int colour) { int flag=0; model_colour *current,*temp; current=*p_model_colours; temp=*p_model_colours; /*while(temp) { counter++; printf("reading %s ",temp->name); temp=temp->next; }*/ if(colour>=15) { colour=0; } while((current) && (f...
false
false
false
false
false
0
drbd_get_syncer_progress(struct drbd_device *device, union drbd_dev_state state, unsigned long *rs_total, unsigned long *bits_left, unsigned int *per_mil_done) { /* this is to break it at compile time when we change that, in case we * want to support more than (1<<32) bits on a 32bit arch. */ typecheck(unsigned...
false
false
false
false
false
0
filecmp(const char *filename1, const char *filename2) { git_file file1, file2; struct stat stat1, stat2; /* char buffer1[1024], buffer2[1024]; */ file1 = gitfo_open(filename1, O_RDONLY); file2 = gitfo_open(filename2, O_RDONLY); if (file1 < 0 || file2 < 0) return GIT_ERROR; gitfo_fstat(file1, &stat1); gitf...
false
false
false
false
false
0
item_removed (EReflowModel *model, gint i, EReflow *reflow) { gint c; gint sorted; if (i < 0 || i >= reflow->count) return; sorted = e_sorter_model_to_sorted (E_SORTER (reflow->sorter), i); for (c = reflow->column_count - 1; c >= 0; c--) { gint start_of_column = reflow->columns[c]...
false
false
false
false
false
0
leftBottom() { if (!m_floatingObjects) return 0; int bottom=0; FloatingObject* r; QListIterator<FloatingObject*> it(*m_floatingObjects); while ( it.hasNext() ) { r = it.next(); if (r->endY>bottom && r->type == FloatingObject::FloatLeft) bottom=r->endY; } return bo...
false
false
false
false
false
0
infc_browser_handle_saved_session(InfcBrowser* browser, InfXmlConnection* connection, xmlNodePtr xml, GError** error) { InfcBrowserPrivate* priv; InfcBrowserNode* node; InfcRequest* request; InfcBrowserIter ite...
false
false
false
false
false
0
dirty_restore(SDL_Surface *target, SDL_Surface *background, int bg_xoff, int bg_yoff) { SDL_Rect r,rb; unsigned long int mask; int row; if (all_dirty[1 - drawto]) { r.x = bg_xoff; r.y = bg_yoff; r.w = target->w; r.h = target->h; SDL_BlitSurface(background,&r,target,0); ...
false
false
false
false
false
0
rfbShutdownSockets(rfbScreenInfoPtr rfbScreen) { if (rfbScreen->socketState!=RFB_SOCKET_READY) return; rfbScreen->socketState = RFB_SOCKET_SHUTDOWN; if(rfbScreen->inetdSock>-1) { closesocket(rfbScreen->inetdSock); FD_CLR(rfbScreen->inetdSock,&rfbScreen->allFds); rfbScreen->inetdSock=-1; } if(...
false
false
false
false
false
0
sockets_accept(int socket, void *buf, int len, sockets *ss) { int new_sock, sas, ni; struct sockaddr_in sa; sas = sizeof(sa); new_sock = accept(ss->sock, (struct sockaddr *) &sa, (socklen_t *) &sas); if (new_sock < 0) { if (errno != EINTR) { LOG("sockets_accept: accept()"); return 1; } } ni = socket...
false
false
false
false
true
1
PyvtkQuadraticEdge_IntersectWithLine(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IntersectWithLine"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQuadraticEdge *op = static_cast<vtkQuadraticEdge *>(vp); double temp0[3]; double save0[3]; const int size0 = 3; double temp1[3]; ...
false
false
false
false
false
0
set_array_region_max_dim_lower_upper(const Array_region_list_semnode *region, const Array_table *cm_atbl, const int dim, int *lower, int *upper) { Array_range_semnode *...
false
false
false
false
false
0
_gcry_mpi_set_highbit( gcry_mpi_t a, unsigned int n ) { unsigned int limbno, bitno; if (mpi_is_immutable (a)) { mpi_immutable_failed (); return; } limbno = n / BITS_PER_MPI_LIMB; bitno = n % BITS_PER_MPI_LIMB; if ( limbno >= a->nlimbs ) { mpi_resize (a, limbno+1 ); a->n...
false
false
false
true
false
1
L22() {register object *base=vs_base; register object *sup=base+VM22; VC22 vs_check; {object V57; V57=(base[0]); vs_top=sup; goto TTL; TTL:; if(!(((V57))==(((object)VV[42])))){ goto T119;} {frame_ptr fr; fr=frs_sch_catch(((object)VV[0])); if(fr==NULL) FEerror("The tag ~s is undefined.",1,((object)VV[0])); b...
false
false
false
false
false
0
maybe_revenge(struct chanset_t *chan, char *whobad, char *whovictim, int type) { char *badnick, *victim; int mevictim; struct userrec *u, *u2; if (!chan || (type < 0)) return; /* Get info about offender */ u = get_user_by_host(whobad); badnick = splitnick(&whobad); /* Ge...
false
false
false
false
false
0
parse_r_drop(struct parser *p) { struct monster_race *r = parser_priv(p); struct monster_drop *d; struct object_kind *k; int tval, sval; if (!r) return PARSE_ERROR_MISSING_RECORD_HEADER; tval = tval_find_idx(parser_getsym(p, "tval")); if (tval < 0) return PARSE_ERROR_UNRECOGNISED_TVAL; sval = lookup_sval(t...
false
false
false
false
false
0
set_bv_data(IntSet bvpt, int entry_num, symbol_kind AorV) { int size; switch(AorV){ case KIND_VAR: size = v_size; break; case KIND_ARRAY: size = a_size; break; default: size = 0; qrfeerror("set_bv_data: must KIND_ARRAY or KIND_VAR!\n"); } if((bvpt == NULL)&&(size>=0)){ construct...
false
false
false
false
false
0
win_new_shellsize() { static int old_Rows = 0; static int old_Columns = 0; if (old_Rows != Rows || old_Columns != Columns) ui_new_shellsize(); if (old_Rows != Rows) { /* if 'window' uses the whole screen, keep it using that */ if (p_window == old_Rows - 1 || old_Rows == 0) p_window = Rows -...
false
false
false
false
false
0
editor_change_line_indent(GeanyEditor *editor, gint line, gboolean increase) { const GeanyIndentPrefs *iprefs = editor_get_indent_prefs(editor); ScintillaObject *sci = editor->sci; if (iprefs->type == GEANY_INDENT_TYPE_TABS) change_tab_indentation(editor, line, increase); else { gint width = sci_get_line_inde...
false
false
false
false
false
0
ScalarizeVectorStore(SDValue Op, SelectionDAG &DAG) const { StoreSDNode *Store = cast<StoreSDNode>(Op); EVT MemEltVT = Store->getMemoryVT().getVectorElementType(); EVT EltVT = Store->getValue().getValueType().getVectorElementType(); EVT PtrVT = Store->getBasePt...
false
false
false
false
false
0
addToArray(tzEntry **base, int *arraysize, int n, tzEntry *entry, bool override) { tzEntry *arrayptr; int low; int high; /* * Search the array for a duplicate; as a useful side effect, the array is * maintained in sorted order. We use strcmp() to ensure we match the * sort order datetime.c expect...
false
true
false
false
false
1
report_text( char *prefix, char *buf ) { static char work[1024]; char *tmp; if ( !f_debug ) return; if ( !f_report ) return; /* don't report */ debug("%s \"", prefix); while ( *buf ) { memset( work, 0, sizeof(work)); tmp = work; ...
false
false
false
false
false
0
SCPI_ResultIntBase(scpi_t * context, int32_t val, int8_t base) { char buffer[33]; const char * basePrefix; size_t result = 0; size_t len; len = SCPI_LongToStr(val, buffer, sizeof (buffer), base); basePrefix = getBasePrefix(base); result += writeDelimiter(context); if (basePrefix != NUL...
false
false
false
false
false
0
dump_remctxs (ProfContext *ctx) { fprintf (outfile, "\nContext summary\n"); for (RemCtxContext *remctx = ctx->remctxs; remctx; remctx = remctx->next) fprintf (outfile, "\tContext: %p, domain: %p\n", (void *) remctx->remctx_id, (void *) remctx->domain_id); }
false
false
false
false
false
0
as3722_pinctrl_gpio_set_direction(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, unsigned offset, bool input) { struct as3722_pctrl_info *as_pci = pinctrl_dev_get_drvdata(pctldev); struct as3722 *as3722 = as_pci->as3722; int mode; mode = as3722_pinctrl_gpio_get_mode( as_pci->gpio_control[offse...
false
false
false
false
false
0
brcmf_chip_dmp_get_desc(struct brcmf_chip_priv *ci, u32 *eromaddr, u8 *type) { u32 val; /* read next descriptor */ val = ci->ops->read32(ci->ctx, *eromaddr); *eromaddr += 4; if (!type) return val; /* determine descriptor type */ *type = (val & DMP_DESC_TYPE_MSK); if ((*type & ~DMP_DESC_ADDRSIZE_GT32...
false
false
false
false
false
0
ns_get_ssh_port(void) { static int port = 0; struct servent *srv; if (port) return port; /* (fixme) replace with getservbyname_r on systems that have it */ srv = getservbyname("ssh", "tcp"); return (port = (srv ? ntohs(srv->s_port) : NS_DFLT_SSH_PORT)); }
false
false
false
false
true
1
JCnewConn(void) { JABBER_Conn *jnew = NULL; /* Create a new connection struct, and put it on the top of the list */ jnew = calloc(1, sizeof(JABBER_Conn)); jnew->next = Connections; eb_debug(DBG_JBR, "JCnewConn: %p\n", jnew); Connections = jnew; jnew->state = JCONN_STATE_OFF; return (Connections); }
false
false
false
false
false
0
sys_add_fcast_variance (equation_system *sys, gretl_matrix *F, int n_static) { gretl_matrix *se = NULL; double ftj, vti; int n = sys->neqns + sys->nidents; int k = F->rows - n_static; int i, j, s; int err = 0; if (k > 0) { se = sys_get_fcast_se(sys, k, &err); if (err) { goto b...
false
false
false
true
false
1
do_parse(json_config *config, const char *filename) { FILE *input; json_parser parser; int ret; int col, lines; input = open_filename(filename, "r", 1); if (!input) return 2; /* initialize the parser structure. we don't need a callback in verify */ ret = json_parser_init(&parser, config, NULL, NULL); if (r...
false
false
false
false
true
1
ExpandSinCosLibCall(SDNode *Node, SmallVectorImpl<SDValue> &Results) { RTLIB::Libcall LC; switch (Node->getSimpleValueType(0).SimpleTy) { default: llvm_unreachable("Unexpected request for libcall!"); case MVT::f32: LC = RTLIB::SINCOS_F32; break; case MVT::f64: ...
false
false
false
false
false
0
ecore_con_client_fd_get(Ecore_Con_Client *cl) { if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT)) { ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT, __func__); return -1; } return ecore_main_fd_handler_fd_get(cl->fd_handler); }
false
false
false
false
false
0
afr_transaction_resume (call_frame_t *frame, xlator_t *this) { afr_internal_lock_t *int_lock = NULL; afr_local_t *local = NULL; afr_private_t *priv = NULL; local = frame->local; int_lock = &local->internal_lock; priv = this->private; afr_res...
false
false
false
false
false
0
findWhichCube (const int sceneID, const QList<CubeView *> cubeViews, const double position[]) { // For some reason this function cannot compile with return-type CubeView *. double distance = 10000.0; // Large value. double d = 0.0; double dx = 0.0; double dy = 0.0; double...
false
false
false
false
false
0
pd6729_interrupt(int irq, void *dev) { struct pd6729_socket *socket = (struct pd6729_socket *)dev; int i; int loopcount = 0; int handled = 0; unsigned int events, active = 0; while (1) { loopcount++; if (loopcount > 20) { printk(KERN_ERR "pd6729: infinite eventloop " "in interrupt\n"); break;...
false
false
false
false
false
0
inflate_codes_new( uInt bl, uInt bd, const inflate_huft *tl, const inflate_huft *td, // need separate declaration for Borland C++ z_streamp z) { inflate_codes_statef *c; if ((c = (inflate_codes_statef *) ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL) { c->mode = START; c->lbits = (Byte...
false
false
false
false
false
0
gprint_send(const string& output) { string strg = output; string::size_type pos = strg.find('\n'); while (pos != string::npos) { string part = strg.substr(0, pos); g_message((char*)part.c_str()); string::size_type len = strg.length(); strg = strg.substr(pos+1, len-pos); pos = strg.find('\n'); } if (gle_o...
false
false
false
false
false
0
setup_blame_parent_line(struct view *view, struct blame *blame) { char from[SIZEOF_REF + SIZEOF_STR]; char to[SIZEOF_REF + SIZEOF_STR]; const char *diff_tree_argv[] = { "git", "diff", "--no-textconv", "--no-extdiff", "--no-color", "-U0", from, to, "--", NULL }; struct io io; int parent_lineno = -1; int blam...
false
false
false
false
false
0
gmpc_browsers_metadata_browser_artist_entry_changed (GmpcBrowsersMetadata* self, GtkEditable* entry) { GtkEditable* _tmp0_; const gchar* _tmp1_ = NULL; gchar* _tmp2_; gchar* text; const gchar* _tmp3_; gint _tmp4_; gint _tmp5_; GtkTreeModelFilter* _tmp10_; g_return_if_fail (self != NULL); g_return_if_fail (ent...
false
false
false
false
false
0
write_frame_header (j_compress_ptr cinfo) { int ci, prec; boolean is_baseline; jpeg_component_info *compptr; /* Emit DQT for each quantization table. * Note that emit_dqt() suppresses any duplicate tables. */ prec = 0; for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; ci++...
false
false
false
false
false
0
intdeg_to_dec(const int ideg) { double d; if (ideg >= 0) { d = ((2147483647) - ideg) / (double)8388608; } else { d = ((-2147483647-1) + ideg) / (double)8388608; } return(d); }
false
false
false
false
false
0
RemoveLogicalsFromFirstFour(void) { int i, j = 4, numMoved = 0, swapped = 0; MBRPart temp; for (i = 0; i < 4; i++) { if ((partitions[i].GetInclusion() != PRIMARY) && (partitions[i].GetLengthLBA() > 0)) { j = 4; swapped = 0; do { if ((partitions[j].GetInclusion() ==...
false
false
false
false
false
0
search_modules(heim_object_t key, heim_object_t value, void *ctx) { struct iter_ctx *s = ctx; struct plugin2 *p = value; struct plug *pl = heim_dict_copy_value(p->names, s->n); struct common_plugin_method *cpm; if (pl == NULL) { if (p->dsohandle == NULL) return; pl = heim_alloc(sizeof(*pl),...
false
false
false
false
false
0
int_unregister_cb_doall_arg(ENGINE_PILE *pile, ENGINE *e) { int n; /* Iterate the 'c->sk' stack removing any occurance of 'e' */ while((n = sk_ENGINE_find(pile->sk, e)) >= 0) { (void)sk_ENGINE_delete(pile->sk, n); pile->uptodate = 0; } if(pile->funct == e) { engine_unlocked_finish(e, 0); pile->funct ...
false
false
false
false
false
0
receive_file (receive_cb cb, void *opaque) { guestfs_chunk chunk; char lenbuf[4]; XDR xdr; int r; uint32_t len; for (;;) { CLEANUP_FREE char *buf = NULL; if (verbose) fprintf (stderr, "guestfsd: receive_file: reading length word\n"); /* Read the length word. */ if (xread (sock, lenb...
true
true
false
false
false
1
mxmlSetText(mxml_node_t *node, /* I - Node to set */ int whitespace, /* I - 1 = leading whitespace, 0 = no whitespace */ const char *string) /* I - String */ { /* * Range check input... */ if (!node || node->type != MXML_TEXT || !string) return (-1); /* * Free any old string v...
false
false
false
false
false
0
bet_finance_calcule_show_months_tab ( GtkTreeModel *model, struct_echeance *s_echeance, gdouble taux_frais ) { gint duree_min = 3; gint duree_max = 18; gint index; for ( index = duree_min; index <= duree_max; index++ ) { s_echeance -> duree = ...
false
false
false
false
false
0
_proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, int x, int y) { Evas_Func *func; Evas_Object_Image *o; o = proxy->object_data; if (!o->proxyerror) printf("Err: Argh! Recursive proxies.\n"); o->proxyerror = 1; func = proxy->layer->evas->engine.func; ...
false
false
false
false
false
0
get_next_free_cluster(Fs_t *This, unsigned int last) { unsigned int i; if(This->last != MAX32) last = This->last; if (last < 2 || last >= This->num_clus+1) last = 1; for (i=last+1; i< This->num_clus+2; i++) { unsigned int r = fatDecode(This, i); if(r == 1) goto exit_0; if (!r) { This->last =...
false
false
false
false
false
0
createBufferClone(void *stackBuffer, int32_t &bufferSize, UErrorCode &status) { if (U_FAILURE(status)){ return NULL; } // // If user buffer size is zero this is a preflight operation to // obtain the needed buffer siz...
false
false
false
false
false
0
gcov_info_reset(struct gcov_info *info) { struct gcov_ctr_info *ci_ptr; unsigned int fi_idx; unsigned int ct_idx; for (fi_idx = 0; fi_idx < info->n_functions; fi_idx++) { ci_ptr = info->functions[fi_idx]->ctrs; for (ct_idx = 0; ct_idx < GCOV_COUNTERS; ct_idx++) { if (!counter_active(info, ct_idx)) cont...
false
false
false
false
false
0
scope_collateral_clause (NODE_T * p, SCOPE_T ** s) { if (p != NO_NODE) { if (!(whether (p, BEGIN_SYMBOL, END_SYMBOL, STOP) || whether (p, OPEN_SYMBOL, CLOSE_SYMBOL, STOP))) { scope_statement_list (p, s); } } }
false
false
false
false
false
0
ext2fs_inode_io_intern2(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode, char **name) { struct inode_private_data *data; errcode_t retval; if ((retval = ext2fs_get_mem(sizeof(struct inode_private_data), &data))) return retval; data->magic = EXT2_ET_MAGIC_INODE_IO_CHANNEL; sprint...
false
false
false
false
false
0
HandleSystemAudioModeRequest(const cec_command &command) { if (m_processor->CECInitialised() && m_processor->IsHandledByLibCEC(command.destination)) { CCECAudioSystem *device = CCECBusDevice::AsAudioSystem(GetDevice(command.destination)); if (device) { if (command.parameters.size >= 2) { ...
false
false
false
false
false
0
csetrrcount (long scount) { int size, pos = 0, count; if (scount <= rrcount) return; /*Old repeated message */ do { GETLONG ((rbuffer + pos), count); GETSHORT ((rbuffer + pos) + 4, size); pos += size; } while (count < scount); memmove (rbuffer, rbuffer + pos, rposit...
false
false
false
false
false
0
cdf_print_elapsed_time(char *buf, size_t bufsiz, cdf_timestamp_t ts) { size_t len = 0; int days, hours, mins, secs; ts /= CDF_TIME_PREC; secs = ts % 60; ts /= 60; mins = ts % 60; ts /= 60; hours = ts % 24; ts /= 24; days = ts; if (days) { len += snprintf(buf + len, bufsiz - len, "%dd+", days); if (len ...
false
false
false
false
false
0
rtsp_ext_real_after_send (GstRTSPExtension * ext, GstRTSPMessage * req, GstRTSPMessage * resp) { GstRTSPReal *ctx = (GstRTSPReal *) ext; switch (req->type_data.request.method) { case GST_RTSP_OPTIONS: { gchar *challenge1 = NULL; gchar *server = NULL; gst_rtsp_message_get_header (resp...
false
true
false
false
true
1
xmms_ipc_tcp_read (xmms_ipc_transport_t *ipct, char *buffer, int len) { xmms_socket_t fd; int ret; x_return_val_if_fail (ipct, -1); x_return_val_if_fail (buffer, -1); fd = ipct->fd; ret = recv (fd, buffer, len, 0); return ret; }
false
false
false
false
false
0
show() { #ifdef _DEBUG std::cout << "MsgDiag::show\n"; #endif SESSION::set_dialog_shown( true ); CORE::core_set_command( "dialog_shown" ); Gtk::MessageDialog::show(); }
false
false
false
false
false
0
check_stack(unsigned long ip, unsigned long *stack) { unsigned long this_size, flags; unsigned long *p, *top, *start; static int tracer_frame; int frame_size = ACCESS_ONCE(tracer_frame); int i, x; this_size = ((unsigned long)stack) & (THREAD_SIZE-1); this_size = THREAD_SIZE - this_size; /* Remove the frame of t...
false
false
false
false
false
0
inf_communication_registry_send_real(InfCommunicationRegistryEntry* entry, guint num_messages) { xmlNodePtr container; xmlNodePtr child; xmlNodePtr xml; guint i; container = xmlNewNode(NULL, (const xmlChar*)"group"); if(entry->publisher_string != NULL) { inf_xml_u...
false
false
false
false
false
0
PrintSelf(ostream& os, vtkIndent indent) { this->Superclass::PrintSelf(os, indent); os << indent << "Number of Information Objects: " << this->NumberOfInformationObjects << "\n"; os << indent << "Information Objects:\n"; for(int i=0; i < this->NumberOfInformationObjects; ++i) { vtkInformation* info = th...
false
false
false
false
false
0
parse_format(const char *token, char *line) { char *cp, *sep; /* * Extract the first token from the value * which tells us which style of format this is */ cp = line; while (*cp && !isspace((unsigned char)(*cp))) cp++; if (!(*cp)) { /* * If we haven't got anything l...
false
false
false
false
false
0
editorWidget(const CLAM::DynamicType & object, unsigned attribute) { // const CLAM::BPF & value = *(CLAM::BPF *)object.GetAttributeAsVoidPtr(attribute); QGraphicsView * input = new QGraphicsView; return input; }
false
false
false
false
false
0
m_time(aClient *cptr, aClient *sptr, int parc, char *parv[]) { if (hunt_server(cptr,sptr,":%s TIME :%s",1,parc,parv) == HUNTED_ISME) sendto_one(sptr, replies[RPL_TIME], ME, BadTo(parv[0]), ME, date((long)0)); return 2; }
false
false
false
false
false
0
mov_write_trkn_tag(ByteIOContext *pb, MOVMuxContext *mov, AVFormatContext *s) { AVMetadataTag *t = av_metadata_get(s->metadata, "track", NULL, 0); int size = 0, track = t ? atoi(t->value) : 0; if (track) { int64_t pos = url_ftell(pb); put_be32(pb, 0); /* size */...
false
false
false
false
true
1
StackAction(cs, wr, action) ChimeraStack cs; ChimeraRequest *wr; char *action; { MemPool mp; char *rstr; char *rname; size_t len; bool newhead; /* * Should probably give an error message here. */ if (wr == NULL) return; if (strcmp("open", action) == 0) { mp = MPCreate(); len = strlen(w...
false
false
false
false
false
0
garmin_txt_rd_deinit(void) { header_type h; for (h = waypt_header; h <= unknown_header; h++) { free_header(h); } gbfclose(fin); xfree(date_time_format); }
false
false
false
false
false
0
_sizeargv(char *str, char *ignore) { int count = 0; do { while (*str && (isspace(*str) || strchr(ignore, *str))) str++; if (*str) count++; while (*str && !(isspace(*str) || strchr(ignore, *str))) str++; } while (*str); return count; }
false
false
false
false
false
0
Send() // Sends 600-style header to printer. { DRIVER_ERROR err; StartSend(); if (dyeCount==3) // color pen { err = ConfigureRasterData(); ERRCHECK; } else // black pen { err=Simple(); // set color mode and resolution ERRCHECK...
false
false
false
false
false
0
newUnpicklerobject(PyObject *f) { Unpicklerobject *self; if (!( self = PyObject_GC_New(Unpicklerobject, &Unpicklertype))) return NULL; self->file = NULL; self->arg = NULL; self->stack = (Pdata*)Pdata_New(); self->pers_func = NULL; self->last_string = NULL; self->marks = NULL; ...
false
false
false
false
false
0
lreply(int n, const char *fmt, ...) #else lreply(n, fmt, va_alist) int n; char *fmt; va_dcl #endif { va_list ap; #ifdef __STDC__ va_start(ap, fmt); #else va_start(ap); #endif (void)printf("%d- ", n); (void)vprintf(fmt, ap); (void)printf("\r\n"); va_end(ap); (void)fflush(stdout); if (debug) { #ifdef __STDC__...
false
false
false
false
false
0
sortconnecteur( df, c, position ) FILE *df; locon_list *c; int position; { losig_list *signal; ptype_list *pt; convindex *noeudbase; num_list *tetenum,*scannum; char v[1024]; int lgmot; signal = c->SIG; pt = getptype( signal->USER, SPI_DRIVER_PTYPE ); noeud...
false
false
false
false
true
1
gt_pch_p_P11cgraph_edge4htab (ATTRIBUTE_UNUSED void *this_obj, void *x_p, ATTRIBUTE_UNUSED gt_pointer_operator op, ATTRIBUTE_UNUSED void *cookie) { struct htab * const x ATTRIBUTE_UNUSED = (struct htab *)x_p; if ((*x).entries != NULL) { size_t i0; for (i0 = 0; i0 != (size_t)(((*x)).size); i0++) { i...
false
false
false
false
false
0
gedReadChar( GED_STREAM * pGedStream, FLMUINT64 ui64FilePos) { RCODE rc = FERR_OK; pGedStream->errorIO = 0; if( pGedStream->pFileHdl) { FLMUINT bytesRead; char * pszTemp; pszTemp = pGedStream->pThis + (FLMINT32)(ui64FilePos - pGedStream->ui64FilePos); if( pGedStream->pBuf == pGedStream...
false
false
false
false
false
0
acpi_gpio_package_count(const union acpi_object *obj) { const union acpi_object *element = obj->package.elements; const union acpi_object *end = element + obj->package.count; unsigned int count = 0; while (element < end) { if (element->type == ACPI_TYPE_LOCAL_REFERENCE) count++; element++; } return count...
false
false
false
false
false
0
mkill_user_cb (USER * user, struct gkilldata *data) { if (user->ip == data->ip) { if (data->sender && user->level >= data->sender->level && data->sender->level < LEVEL_ELITE) { ASSERT (ISUSER (data->sender->con)); send_cmd (data->sender->con, MSG_SERVER_NOSUCH, "kill failed: permission ...
true
true
false
false
false
1
compute_incoming_payload(object *target_objp) { missile_obj *mo; float payload = 0.0f; for ( mo = GET_NEXT(&Missile_obj_list); mo != END_OF_LIST(&Missile_obj_list); mo = GET_NEXT(mo) ) { object *objp; objp = &Objects[mo->objnum]; Assert(objp->type == OBJ_WEAPON); if (Weapons[objp->instance].homing_object...
false
false
false
false
false
0
g3d_quat_to_rotation_xyz(G3DQuat *q, G3DFloat *rx, G3DFloat *ry, G3DFloat *rz) { G3DFloat t; /* rx */ t = 1 - 2 * (q[1] * q[1] + q[2] * q[2]); if(t != 0) *rx = atan(2 * (q[0] * q[1] + q[2] * q[3]) / t); else *rx = 0.0; /* ry */ *ry = asin(2 * (q[0] * q[2] - q[1] * q[3])); /* rz */ t = 1 - 2 * (q[2] * q...
false
false
false
false
false
0
load_policy_from_option(config_line_t *config, smartlist_t **policy, int assume_action) { int r; addr_policy_list_free(*policy); *policy = NULL; r = parse_addr_policy(config, policy, assume_action); if (r < 0) { return -1; } if (*policy) { SMARTLIST_FOREACH_BEGIN(*policy, a...
false
true
false
false
false
1