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
live_search_finalize (GObject *obj) { GcrLiveSearch *self = GCR_LIVE_SEARCH (obj); if (self->pv->stripped_words != NULL) g_ptr_array_unref (self->pv->stripped_words); G_OBJECT_CLASS (_gcr_live_search_parent_class)->finalize (obj); }
false
false
false
false
false
0
hposition(int newx) { if (newx == hposition_) return; hposition_ = trivmax(newx, 0); redraw_image(); }
false
false
false
false
false
0
glade_property_set_sensitive (GladeProperty *property, gboolean sensitive, const gchar *reason) { g_return_if_fail (GLADE_IS_PROPERTY (property)); /* reason is only why we're disableing it */ if (sensitive == FALSE) { if (property->insensitive_tooltip) g_free (property->insensitive_...
false
false
false
false
false
0
Open( string openString ) { boolean opened = true; #pragma omp critical { m_ifstream.open(openString.c_str(), ios::in | ios::binary ); if( m_ifstream.is_open() ) { m_openString = openString; if( ParseStream(m_ifstream) ) { ; } else{ m_ifstream.clear(); m_ifstream.close(); } }else{ m_ifstream...
false
false
false
false
false
0
find_group(char *name) { GROUP *gp; for(gp=kbp->groups; gp!=NULL; gp=gp->next) { if(strcasecmp(name,gp->name) == 0) return gp; } return NULL; }
false
false
false
false
false
0
OPLLRead(YM2413 *chip,int a) { if( !(a&1) ) { /* status port */ return chip->status; } return 0xff; }
false
false
false
false
false
0
searchOperSpecData(const QString &name) { QByteArray name_latin1_array = name.toLatin1(); const char *name_latin1 = name_latin1_array.data(); // binary search // establish invariant g_oper_spec_data[begin].name < name < g_oper_spec_data[end].name int cmp = qstrcmp(name_latin1, g_oper_spec_data[0]....
false
false
false
false
false
0
udp_start(Cfg *cfg) { CfgGroup *grp; Octstr *iface; List *ifs; int allow_wtls; if (udp_running) return -1; debug("bb.udp", 0, "starting UDP sender/receiver module"); grp = cfg_get_single_group(cfg, octstr_imm("core")); iface = cfg_get(grp, octstr_imm("wdp-interface-name")); ...
false
false
false
false
false
0
RestoreAtariMouseCursorPosition() { int xpos, ypos; SDL_GetMouseState(&xpos, &ypos); if (atari_mouse_xpos >=0 && atari_mouse_ypos >= 0) { D(bug("Restoring mouse cursor pointer to [%d, %d]", xpos, ypos)); getARADATA()->setAtariMousePosition(xpos, ypos); int delta_x = xpos - atari_mouse_xpos; int delta_y = ypo...
false
false
false
false
false
0
compile_template(CODE code, int argc) { BUFFER obuf; VECTOR olittab; OVECTOR template; obuf = code->buf; code->buf = newbuf(0); olittab = code->littab; code->littab = NULL; if (!expr_parse(code)) { killbuf(code->buf); code->buf = obuf; code->littab = olittab; return NULL; } gen(c...
false
false
false
false
false
0
tun_chr_open(struct inode *inode, struct file * file) { struct net *net = current->nsproxy->net_ns; struct tun_file *tfile; DBG1(KERN_INFO, "tunX: tun_chr_open\n"); tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0); if (!tfile) return -ENOMEM; RCU_INIT_POINTER(tfile->tun,...
false
false
false
false
false
0
xgmac_set_flow_ctrl(struct xgmac_priv *priv, int rx, int tx) { u32 reg; unsigned int flow = 0; priv->rx_pause = rx; priv->tx_pause = tx; if (rx || tx) { if (rx) flow |= XGMAC_FLOW_CTRL_RFE; if (tx) flow |= XGMAC_FLOW_CTRL_TFE; flow |= XGMAC_FLOW_CTRL_PLT | XGMAC_FLOW_CTRL_UP; flow |= (PAUSE_TIME <...
false
false
false
false
false
0
glade_gtk_paned_post_create (GladeWidgetAdaptor * adaptor, GObject * paned, GladeCreateReason reason) { g_return_if_fail (GTK_IS_PANED (paned)); if (reason == GLADE_CREATE_USER && gtk_paned_get_child1 (GTK_PANED (paned)) == NULL) gtk_paned_add1 (GTK_PANED (paned), glade_place...
false
false
false
false
false
0
different_lengths_toggled(AffcorControls *controls, GtkToggleButton *toggle) { AffcorArgs *args = controls->args; guint flags; args->different_lengths = gtk_toggle_button_get_active(toggle); if (!args->different_lengths) { const gchar *buf = gtk_entry_get_text(GTK_ENTR...
false
false
false
false
false
0
aa_unix_label_sk_perm(struct aa_label *label, const char *op, u32 request, struct sock *sk) { struct aa_profile *profile; return fn_for_each_confined(label, profile, profile_sk_perm(profile, op, request, sk)); }
false
false
false
false
false
0
test_engine_unload_plugin (PeasEngine *engine) { PeasPluginInfo *info; info = peas_engine_get_plugin_info (engine, "loadable"); /* Check that we can unload a plugin that is not loaded */ g_assert (peas_engine_unload_plugin (engine, info)); test_engine_load_plugin (engine); g_assert (peas_engine_unload_p...
false
false
false
false
false
0
gsbkif (struct gsrecd *recd, struct gsrecd *ifblk, struct gsrecd *doblk, gaint *rc) { gaint ret,eflg; struct gsrecd *elsblk=NULL; eflg = 0; ret = 0; while (recd!=NULL && recd->type!=11 && recd->type!=9 && ret==0) { if (recd->type==8 && eflg==0) { elsblk = recd; ...
false
false
false
false
false
0
polkit_backend_authority_register (PolkitBackendAuthority *authority, GDBusConnection *connection, const gchar *object_path, GError **error) { Server *server; server = g...
false
false
false
false
false
0
triggerMouse (int id, int button) { if (!active) return; highlight = true; if (button) execFunction (button); }
false
false
false
false
false
0
gromit_draw_line (GromitData *data, gint x1, gint y1, gint x2, gint y2) { GdkRectangle rect; static gint prev_x1=0, prev_y1=0, prev_x2=0, prev_y2=0; if (debug) fprintf(stderr, "line (%d,%d) (%d,%d)\n", x1, y1, x2, y2); // strange left-corner line bugfix if (x1) prev_x1 = x1; else x1 = prev...
false
false
false
false
false
0
extract_init(struct SigSet *S) { int m; int i; int b1, b2; int nbands; double *lambda; struct ClassSig *C; struct SubSig *SubS; nbands = S->nbands; /* allocate scratch memory */ lambda = (double *)G_malloc(nbands * sizeof(double)); /* invert matrix and compute constant for ...
false
false
false
false
false
0
SetUp( std::vector<double> const &x, std::vector<double> const &y ) { std::size_t xSize = x.size(); std::size_t ySize = y.size(); std::size_t size = std::min( xSize, ySize ); x_.assign( x.begin(), x.end() ); y_.assign( y.begin(), y.end() ); xmin_ = x_[0]; xmax_ = x_[0]; ymin_ = y_[0]; ymax_ = y_[0]; ...
false
false
false
false
false
0
parse_block(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size) { size_t beg, end, i; uint8_t *txt_data; beg = 0; if (rndr->work_bufs[BUFFER_SPAN].size + rndr->work_bufs[BUFFER_BLOCK].size > rndr->max_nesting) return; while (beg < size) { txt_data = data + beg; end = size - beg; if (...
false
false
false
false
false
0
i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data, struct drm_file *file) { struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_gem_get_aperture *args = data; struct i915_gtt *ggtt = &dev_priv->gtt; struct i915_vma *vma; size_t pinned; pinned = 0; mutex_lock(&dev->struct_mu...
false
false
false
false
false
0
indexupvalue (LexState *ls, expdesc *v) { FuncState *fs = ls->fs; int i; for (i=0; i<fs->nupvalues; i++) { if (fs->upvalues[i].k == v->k && fs->upvalues[i].u.index == v->u.index) return i; } /* new one */ luaX_checklimit(ls, fs->nupvalues+1, MAXUPVALUES, "upvalues"); fs->upvalues[fs->nupvalues] ...
false
false
false
false
false
0
arc_ps2_inhibit_ports(struct arc_ps2_data *arc_ps2) { void __iomem *addr; u32 val; int i; for (i = 0; i < ARC_PS2_PORTS; i++) { addr = arc_ps2_calc_addr(arc_ps2, i, true); val = ioread32(addr); val &= ~(PS2_STAT_RX_INT_EN | PS2_STAT_TX_INT_EN); iowrite32(val, addr); } }
false
false
false
false
false
0
getoption(argc, argv, isopt) int argc; char *CONST *argv; int isopt; { u_long flags; CONST char *arg; int i, j, com; #if defined (FD) && !defined (_NOEDITMODE) emacsmode = vimode = 0; if (editmode) { if (!strcmp(editmode, "emacs")) emacsmode = 1; else if (!strcmp(editmode, "vi")) vimode = 1; } #endif if (a...
false
false
false
false
false
0
extract_record(auparse_state_t *au) { if (f == NULL) return; fprintf(f, "%s\n", auparse_get_record_text(au)); }
false
false
false
false
false
0
spool_store_get_folder_sync (CamelStore *store, const gchar *folder_name, CamelStoreGetFolderFlags flags, GCancellable *cancellable, GError **error) { CamelLocalSettings *local_settings; CamelSpoolStore...
false
false
false
false
false
0
ezdfile_load(const gchar *filename, G_GNUC_UNUSED GwyRunType mode, GError **error) { GwyContainer *meta, *container = NULL; guchar *buffer = NULL; gsize size = 0; GError *err = NULL; EZDSection *section = NULL; GwyDataField *dfield = NULL; GPtrArray *ezdfile; gu...
false
false
false
false
false
0
CRYPTO_pop_info(void) { int ret=0; if (is_MemCheck_on()) /* _must_ be true, or something went severely wrong */ { MemCheck_off(); /* obtain MALLOC2 lock */ ret=(pop_info() != NULL); MemCheck_on(); /* release MALLOC2 lock */ } return(ret); }
false
false
false
false
false
0
update_one_screen(int screen, struct mame_bitmap *bitmap, struct rectangle *cliprect) { struct atarimo_rect_list rectlist; struct mame_bitmap *mobitmap; int x, y, r, mooffset, temp; /* draw the playfield */ tilemap_draw(bitmap, cliprect, screen ? atarigen_playfield2_tilemap : atarigen_playfield_tilemap, 0,...
false
false
false
false
false
0
stm_find_device(const char *buf) { struct stm_device *stm; struct device *dev; if (!stm_core_up) return NULL; dev = class_find_device(&stm_class, NULL, buf, stm_dev_match); if (!dev) return NULL; stm = to_stm_device(dev); if (!try_module_get(stm->owner)) { put_device(dev); return NULL; } return stm...
false
false
false
false
false
0
AproposCommand( void *theEnv) { char *argument; DATA_OBJECT argPtr; struct symbolHashNode *hashPtr = NULL; size_t theLength; /*=======================================================*/ /* The apropos command expects a single symbol argument. */ /*===============================================...
false
false
false
false
false
0
zip_find_trailer (GsfInfileZip *zip) { static guint8 const trailer_signature[] = { 'P', 'K', 0x05, 0x06 }; gsf_off_t offset, trailer_offset, filesize; gsf_off_t maplen; guint8 const *data; filesize = gsf_input_size (zip->source); if (filesize < ZIP_TRAILER_SIZE) return -1; trailer_offset = filesize; maple...
false
true
false
false
false
1
make_rtf_prn (int ID, char *fname, int *err) { char rtffile[FILENAME_MAX]; PRN *prn; if (*fname == '\0') { sprintf(rtffile, "%smodel_%d.rtf", gretl_workdir(), ID); strcpy(fname, rtffile); } else { gretl_maybe_switch_dir(fname); strcpy(rtffile, fname); } prn = gretl_print_new_with_fi...
false
false
false
false
false
0
amdgpu_uvd_cs_packets(struct amdgpu_uvd_cs_ctx *ctx, int (*cb)(struct amdgpu_uvd_cs_ctx *ctx)) { struct amdgpu_ib *ib = &ctx->parser->ibs[ctx->ib_idx]; int r; for (ctx->idx = 0 ; ctx->idx < ib->length_dw; ) { uint32_t cmd = amdgpu_get_ib_value(ctx->parser, ctx->ib_idx, ctx->idx); unsigned type = CP_PACKET_...
false
false
false
false
false
0
bson_oid_gen( bson_oid_t *oid ) { static int incr = 0; static int fuzz = 0; int i; int t = time( NULL ); if( oid_inc_func ) i = oid_inc_func(); else i = incr++; if ( !fuzz ) { if ( oid_fuzz_func ) fuzz = oid_fuzz_func(); else { srand(...
false
false
false
false
true
1
_php_stream_flush(php_stream *stream, int closing TSRMLS_DC) { int ret = 0; if (stream->writefilters.head) { _php_stream_write_filtered(stream, NULL, 0, closing ? PSFS_FLAG_FLUSH_CLOSE : PSFS_FLAG_FLUSH_INC TSRMLS_CC); } if (stream->ops->flush) { ret = stream->ops->flush(stream TSRMLS_CC); } return ret; }
false
false
false
false
false
0
check_for_full_enumeration_handling (tree type) { struct case_node *n; tree chain; /* True iff the selector type is a numbered set mode. */ int sparseness = 0; /* The number of possible selector values. */ HOST_WIDE_INT size; /* For each possible selector value. a one iff it has been matched by ...
false
false
false
false
false
0
create_chainsetup_options(COMMAND_LINE& cline, std::vector<std::string>* options) { cline.begin(); cline.next(); // skip the program name while(cline.end() == false) { options->push_back(cline.current()); cline.next(); } }
false
false
false
false
false
0
translate_tris_ushort2ushort_first2first( const void * _in, unsigned start, unsigned nr, void *_out ) { const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; for (i = start; i < (nr+start); i+=3) { (out+i)[0] = (ushort)in[i]; (out+i)[1] = (usho...
false
false
false
false
false
0
may_eliminate_iv (struct ivopts_data *data, struct iv_use *use, struct iv_cand *cand, tree *bound, enum tree_code *comp) { basic_block ex_bb; edge exit; tree period; struct loop *loop = data->current_loop; aff_tree bnd; struct tree_niter_desc *desc = NULL; if (TREE_CODE (cand->iv->step) != INTEGE...
false
false
false
false
false
0
clone_info(struct info *locp) { struct info *info; make_ref(info); info->filename = ref(locp->filename); info->first_line = locp->first_line; info->first_column = locp->first_column; info->last_line = locp->last_line; info->last_column = locp->last_column; info->error = locp->error; r...
false
false
false
false
false
0
parse_htpl_pts_create(stack, untag) int untag; STR stack; { TOKEN token; static done = 0; STR buff; int code; static int nesting = 0; static int refcount = 0; refcount++; makepersist(stack); if (numtokens < 2) RETURN(croak("%sPTS CREATE called with %d arguments, minimum nee...
false
false
false
false
false
0
diplomat_keep_moving_callback(GtkWidget *w, gpointer data) { struct unit *punit; struct city *pcity; if ((punit = game_unit_by_number(diplomat_id)) && (pcity = game_city_by_number(diplomat_target_id)) && !same_pos(unit_tile(punit), city_tile(pcity))) { request_diplomat_action(DIPLOMAT_MOVE, diplo...
false
false
false
false
false
0
cp_istypedecl(CPState *cp) { if (cp->tok >= CTOK_FIRSTDECL && cp->tok <= CTOK_LASTDECL) return 1; if (cp->tok == CTOK_IDENT && ctype_istypedef(cp->ct->info)) return 1; if (cp->tok == '$') return 1; return 0; }
false
false
false
false
false
0
sec_pkcs12_add_item_to_bag_list(sec_PKCS12SafeBag ***bagList, sec_PKCS12SafeBag *bag) { sec_PKCS12SafeBag **newBagList = NULL; int i = 0; if(!bagList || !bag) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return SECFailure; } if(!(*bagList)) { newBagList = PORT_ArenaZNewArray(bag->arena, sec_PK...
false
false
false
false
false
0
callNamedMethod(xmlrpc_env * const envP, xmlrpc_value * const methodInfo, xmlrpc_value * const paramArrayP, xmlrpc_value ** const resultPP) { xmlrpc_method method; void * user_data; xmlrpc_parse_value(envP, methodInfo, "(pp*)", &method, &user_data);...
false
false
false
false
false
0
skip_packet( IOBUF inp, int pkttype, unsigned long pktlen, int partial ) { if( list_mode ) { fprintf (listfp, ":unknown packet: type %2d, length %lu\n", pkttype, pktlen); if( pkttype ) { int c, i=0 ; fputs("dump:", listfp ); if( partial ) { while( (c=iobuf_get(inp)) != -1...
false
false
false
false
false
0
s5c73m3_set_frame_size(struct s5c73m3 *state) { const struct s5c73m3_frame_size *prev_size = state->sensor_pix_size[RES_ISP]; const struct s5c73m3_frame_size *cap_size = state->sensor_pix_size[RES_JPEG]; unsigned int chg_mode; v4l2_dbg(1, s5c73m3_dbg, &state->sensor_sd, "Preview size: %dx%d, reg_val: ...
false
false
false
false
false
0
FindEffectParametersBySemantic(const FCDMaterial* material, const char* semantic, FCDEffectParameterList& parameters, bool localOnly) { if (material == NULL || semantic == NULL || *semantic == 0) return; size_t count = material->GetEffectParameterCount(); for (size_t p = 0; p < count; ++p) { const FCD...
false
false
false
false
false
0
on_book_removed (Ekiga::SourcePtr /*source*/, Ekiga::BookPtr book, gpointer data) { addressbook_window_remove_book (ADDRESSBOOK_WINDOW (data), book); }
false
false
false
false
false
0
update_monster_subwindow(game_event_type type, game_event_data *data, void *user) { term *old = Term; term *inv_term = user; /* Activate */ Term_activate(inv_term); /* Display monster race info */ if (p_ptr->monster_race_idx) display_roff(p_ptr->monster_race_idx); Term_fresh(); /* Restore */ Term_activa...
false
false
false
false
false
0
get_name(mail::imap &imapAccount, Token t) { if (t == ATOM || t == STRING) { string nameVal; nameVal= t.text; if (oneNameOnly) { if (hiersep.size() > 0) { size_t p=nameVal.rfind(hiersep[0]); if (p != std::string::npos) nameVal=nameVal.substr(p); } } else { if (pfixLength <= n...
false
false
false
false
false
0
gst_pnmdec_push (GstPnmdec * s, GstPad * src, GstBuffer * buf) { /* Need to convert from PNM rowstride to GStreamer rowstride */ if (s->mngr.info.width % 4 != 0) { guint i_rowstride; guint o_rowstride; GstBuffer *obuf; guint i; GstMapInfo imap, omap; if (s->mngr.info.type == GST_PNM_TYPE_PI...
false
true
false
false
false
1
InternalStateToADL(const std::string& s, bool optional, Logger& logger) { if(s == "ACCEPTED") { } else if(s == "") { return "ACCEPTED"; } else if(s == "PREPARING") { return "PREPROCESSING"; } else if(s == "SUBMIT") { } else if(s == "INLRMS") { return "PROCESSING"; } else if(s =...
false
false
false
false
false
0
init_emulbuf(void) { if(!emulbuf) emulbuf = malloc(EMULBUF_FRAMES * sizeof(int) * 2); if(!emulbuf) return -1; return 0; }
false
false
false
false
false
0
jdate_to_timeval(double jd, struct timeval *tv) { struct timeval btv; double bjd; long dsec, dusec; btv.tv_sec = 0; btv.tv_usec = 0; bjd = timeval_to_jdate(&btv); if (bjd > jd) { err_printf("jdate_to_timeval: trying to convert jdate:%.14g " "from before Jan1, 1970\n", jd); return; } dsec = (jd - b...
false
false
false
false
false
0
loginCmd(const char* loginID, const char* pass) { if (IS(LOGGEDIN)) end_login(); the_user = loginID; state &= ~S_PRIVILEGED; adminwd = "*"; // make sure no admin privileges passwd = "*"; // just in case... if (checkUser(loginID)) { if (passwd != "" && ! checkPasswd(pass)) { if (+...
false
false
false
false
false
0
ompfbe_write_receive(fsbe_context* cx, Statement* sp, Quadruple* qp) { if(qp->op[0]->kind != KIND_SYNC){ fprintf(stderr,"!!!!! ERROR illegal receive: op[0]->kind is not SYNC\n"); exit(3); } if(qp->op[1]->kind == KIND_TEMP){ sbe_set_temp(cx, qp->op[1]->entry, sbe_alloc_operand(cx, qp->op[0])); }else...
false
false
false
false
false
0
ncx_pad_getn_schar_uint(const void **xpp, size_t nelems, uint *tp) { size_t rndup = nelems % X_ALIGN; schar *xp = (schar *) *xpp; if(rndup) rndup = X_ALIGN - rndup; while(nelems-- != 0) { *tp++ = *xp++; } *xpp = (void *)(xp + rndup); return ENOERR; }
false
false
false
false
false
0
setup (TestCaseFixture* fixture, gconstpointer user_data) { DEBUG ("setting up"); fixture->main_loop = g_main_loop_new (NULL, FALSE); g_assert (fixture->main_loop != NULL); fixture->manager = tpl_log_manager_dup_singleton (); if (user_data != NULL) setup_service (fixture, user_data); DEBUG ("set...
false
false
false
false
false
0
_bfd_elf_init_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec, struct bfd_link_info *link_info) { Elf_Internal_Shdr *ihdr, *ohdr; bfd_boolean final_link = link_info != NULL && !link_info->relocatable; if (ibfd->xvec->flavour != bfd_target_elf_flavour ...
false
false
false
false
false
0
first_time_check_step_09 (guint *error) { GDir *targetdir,*dir; gchar *targetdirname; gchar *datadirname; const gchar *filename; gchar *srcfile,*destfile; gchar *buff; /* open data directory */ targetdirname = get_trsp_dir (); targetdir = g_dir_open (targetdirname,...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); UrlHistoryBox *_t = static_cast<UrlHistoryBox *>(_o); switch (_id) { case 0: _t->urlClicked((*reinterpret_cast< const QUrl(*)>(_...
false
false
false
false
false
0
set_rxeq_vals(struct qib_devdata *dd, int vsel) { int ret; int ridx; int cnt = ARRAY_SIZE(rxeq_init_vals); for (ridx = 0; ridx < cnt; ++ridx) { int elt, reg, val, loc; elt = rxeq_init_vals[ridx].rdesc & 0xF; reg = rxeq_init_vals[ridx].rdesc >> 4; loc = EPB_LOC(0, elt, reg); val = rxeq_init_vals[ridx].rd...
false
false
false
false
false
0
snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index) { int i; struct snd_seq_port_callback pinfo; char tmpname[64]; emu->client = snd_seq_create_kernel_client(card, index, "%s WaveTable", emu->name); if (emu->client < 0) { snd_printk(KERN_ERR "can't create client\n"); return -EN...
false
false
false
false
false
0
PL_strnlen(const char *str, PRUint32 max) { register const char *s; if( (const char *)0 == str ) return 0; for( s = str; max && *s; s++, max-- ) ; return (PRUint32)(s - str); }
false
false
false
false
false
0
p1_binary(struct Exprblock *e) #endif { if (e == (struct Exprblock *) NULL) return; p1putdd (P1_EXPR, e -> opcode, e -> vtype); p1_expr (e -> vleng); p1_expr (e -> leftp); p1_expr (e -> rightp); }
false
false
false
false
false
0
qc_send (QC_Device * q, unsigned int byte) { unsigned int echo; int n1, n2; write_lpdata (q, byte); qc_wait (q); write_lpcontrol (q, Autofeed | Reset_N); qc_wait (q); n1 = qc_waithand (q, CamRdy1); write_lpcontrol (q, Autofeed | Reset_N | PCAck); qc_wait (q); n2 = qc_waithand (q, 0); echo = (n...
false
false
false
false
false
0
Catrom(const double x,const double ARGUNUSED(support)) { if (x < -2.0) return(0.0); if (x < -1.0) return(0.5*(4.0+x*(8.0+x*(5.0+x)))); if (x < 0.0) return(0.5*(2.0+x*x*(-5.0-3.0*x))); if (x < 1.0) return(0.5*(2.0+x*x*(-5.0+3.0*x))); if (x < 2.0) return(0.5*(4.0+x*(-8.0+x*(5.0-x)))); retu...
false
false
false
false
false
0
bt_ctf_event_get_handle_id(const struct bt_ctf_event *ctf_event) { int ret = -1; const struct ctf_file_stream *cfs; const struct ctf_trace *trace; const struct ctf_event_definition *event; if (!ctf_event) return -EINVAL; event = ctf_event->parent; cfs = container_of(event->stream, const struct ctf_file_strea...
false
false
false
false
false
0
cbuf_writeptr(circbuffer *cbuf, unsigned int len) { if (len > cbuf_writelen(cbuf)) { dropbear_exit("bad cbuf write"); } return &cbuf->data[cbuf->writepos]; }
false
false
false
false
false
0
update_diskio_values(struct diskio_stat *ds, unsigned int reads, unsigned int writes) { int i; double sum=0, sum_r=0, sum_w=0; if (reads < ds->last_read || writes < ds->last_write) { /* counter overflow or reset - rebase to sane values */ ds->last = reads+writes; ds->last_read = reads; ds->last_write = wr...
false
false
false
false
true
1
ExecReScanCteScan(CteScanState *node) { Tuplestorestate *tuplestorestate = node->leader->cte_table; ExecClearTuple(node->ss.ps.ps_ResultTupleSlot); ExecScanReScan(&node->ss); /* * Clear the tuplestore if a new scan of the underlying CTE is required. * This implicitly resets all the tuplestore's read pointers...
false
false
false
false
false
0
TIFFWriteDirectoryTagShort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 value) { if (dir==NULL) { (*ndir)++; return(1); } return(TIFFWriteDirectoryTagCheckedShort(tif,ndir,dir,tag,value)); }
false
false
false
false
false
0
filename_base_length(const gchar *name) { gint n; if (!name) return 0; n = strlen(name); if (filter_name_exists(name)) { const gchar *ext; ext = extension_from_path(name); if (ext) n -= strlen(ext); } return n; }
false
false
false
false
false
0
irmo_struct_add_member(IrmoStruct *structure, char *member_name, unsigned long offset, unsigned long member_size) { IrmoStructMember *member; // Check for duplicates irmo_...
false
false
false
false
false
0
getNewBuilding( uchar type ) { GenericBuilding * ret = (GenericBuilding *)( new Building( theMap, type ) ); _buildings.append( ret ); return ret; }
false
false
false
false
false
0
sinfo_get_std_obs_values(cpl_propertylist* plist, double* exptime, double* airmass, double* dRA, double* dDEC) { double airmass_start=0; double airmass_end=0; check_nomsg(*exptime=sinfo_pfits_get_exp_time(plist)); a...
false
false
false
false
false
0
dev_coredumpm(struct device *dev, struct module *owner, const void *data, size_t datalen, gfp_t gfp, ssize_t (*read)(char *buffer, loff_t offset, size_t count, const void *data, size_t datalen), void (*free)(const void *data)) { static atomic_t devcd_count = ATOMIC_INIT(0); struct devcd_entry *d...
false
true
false
false
true
1
ncvargets(cdfid, varid, start, count, stride, values) int cdfid ; int varid ; const long *start ; const long *count ; const long *stride ; ncvoid *values ; { NC *handle ; cdf_routine_name = "ncvargets" ; handle = NC_check_id(cdfid) ; if (handle == NULL) return(-1) ; handle->xdrs->x_op = XDR_DECODE ; return ...
false
false
false
false
false
0
guessStorageType(const StringC &type, const CharsetInfo &internalCharset) const { for (size_t i = 0; i < storageManagers_.size(); i++) if (storageManagers_[i]->guessIsId(type, internalCharset)) return storageManagers_[i].pointer(); if (defaultStorageManager_->guessIsId(type, internalCharset)) ...
false
false
false
false
false
0
qlist_write(t_qlist *x, t_symbol *filename, t_symbol *format) { int cr = 0; char buf[MAXPDSTRING]; canvas_makefilename(x->x_canvas, filename->s_name, buf, MAXPDSTRING); if (!strcmp(format->s_name, "cr")) cr = 1; else if (*format->s_name) pd_error(x, "qlist_read: unknown flag:...
true
true
false
false
false
1
askFilename(const gchar * title, const gchar * filename, void (*okevent) (GtkWidget *widget, gpointer user_data), gpointer user_data) { p_askFilenameInfos paskFnInf; paskFnInf = (p_askFilenameInfos) g_try_malloc(sizeof(askFilenameInfos)); if (paskFnInf == (p_askFilenameInfos)NULL) { return FALSE; } paskFnI...
false
false
false
false
false
0
dfs_walk_once_accessible (tree binfo, bool friends_p, tree (*pre_fn) (tree, void *), tree (*post_fn) (tree, void *), void *data) { bool diamond_shaped = CLASSTYPE_DIAMOND_SHAPED_P (BINFO_TYPE (binfo)); tree rval = dfs_walk_once_accessible_r (binfo, friends_p, diamond_shaped, pre_fn, post_fn, da...
false
false
false
false
false
0
gageStackBlurParmCopy(gageStackBlurParm *dst, const gageStackBlurParm *src) { static const char me[]="gageStackBlurParmCopy"; int differ; char explain[AIR_STRLEN_LARGE]; if (!(dst && src)) { biffAddf(GAGE, "%s: got NULL pointer", me); return 1; } if (gageStackBlurParmCheck(src...
true
true
false
false
false
1
_vala_array_add6 (gchar*** array, int* length, int* size, gchar* value) { if ((*length) == (*size)) { *size = (*size) ? (2 * (*size)) : 4; *array = g_renew (gchar*, *array, (*size) + 1); } (*array)[(*length)++] = value; (*array)[*length] = NULL; }
false
false
false
false
false
0
slapi_u8_to_hex(uint8_t val, char *s, uint8_t upper) { static char ldigits[] = "0123456789abcdef"; static char udigits[] = "0123456789ABCDEF"; char *digits; if (upper) { digits = udigits; } else { digits = ldigits; } s[0] = digits[val >> 4]; s[1] = digits[val & 0xf]; return &s[2]; }
false
false
false
false
false
0
makeHeader(const char* fmt, const FaxFmtHeader fmts[], fxStr& header) { for (const char* cp = fmt; *cp; cp++) { if (*cp == '%') { u_int width = 0; // field width u_int prec = 0; // field precision #define MAXSPEC 20 char fspec[MAXSPEC]; char* fp = fspec; *fp++ = '%'; char c = *++cp;...
false
false
false
false
false
0
unity_internal_dee_result_set_real_add_result_from_variant (UnityResultSet* base, GVariant* variant) { UnityInternalDeeResultSet * self; static const char EXPECTED_TYPE_STRING[] = "(ssuussssa{sv})"; GVariant* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; GPtrArray* _tmp4_ = NULL; GVariant* _tmp5_ = NULL; GVariant* ...
false
false
false
false
false
0
e2_dialog_resize_with_sw (GtkWidget *dialog, GtkWidget *scrolled) { guint idle_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (dialog), "e2-dialog-resize-idle-id")); if (idle_id != 0) g_source_remove (idle_id); idle_id = g_idle_add ((GSourceFunc) _e2_dialog_resize_idle_cb, dialog); g_object_set_data (G_OBJ...
false
false
false
false
false
0
ns_get_url(_ns_sess * s, int d) { int r, l; char *u; char esc[] = "^_\0"; char lit[] = "^_\0"; USE_VAR(d); if (!s) { return NULL; } l = ((s->proto) ? strlen(s->proto) + 3 : 0) + strlen(s->user) + 1 + strlen(s->host) + 1 + 5 + 1 + ((s->rsrc) ? strlen(s->rsrc) : 0) + 7 +...
false
false
false
false
false
0
CDB___qam_c_close(dbc) DBC *dbc; { QUEUE_CURSOR *cp; cp = dbc->internal; /* Discard any locks not acquired inside of a transaction. */ if (cp->lock.off != LOCK_INVALID) { (void)__TLPUT(dbc, cp->lock); cp->lock.off = LOCK_INVALID; } cp->page = NULL; cp->pgno = PGNO_INVALID; cp->indx = 0; cp->lock.off = ...
false
false
false
false
false
0
dvb_settings_set_string (DVBSettings* self, const gchar* group_name, const gchar* key, const gchar* val, GError** error) { GKeyFile* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; const gchar* _tmp3_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (group_name != NULL); g_return_...
false
false
false
false
false
0
removeProp(const gchar * pszProp) { UT_sint32 iCount = getItemCount(); const char * pszV = NULL; if(iCount <= 0) { return; } UT_sint32 i = 0; for(i=0; i < iCount ; i += 2) { pszV = getNthItem(i); if( (pszV != NULL) && (strcmp( pszV,pszProp) == 0)) { break; } } if(i < iCount) { gchar * pSP = getN...
false
false
false
false
false
0
H5D__chunk_dump_index(H5D_t *dset, hid_t dxpl_id, FILE *stream) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(dset); /* Only display info if stream is defined */ if(stream) { H5D_chk_idx_info_t idx_info; /* Chunked index info ...
false
false
false
false
false
0
GetBounds() { if (this->ImageActor) { // the culler could be asking our bounds, in which case it's possible // that we haven't rendered yet, so we have to make sure our bounds // are up to date so that we don't get culled. this->UpdateImageActor(); return this->ImageActor->GetBounds(); } ...
false
false
false
false
false
0
GetDocName(wxInt32 item, wxString& strBuffer) const { RESULT* result = wxGetApp().GetDocument()->result(item); if (result) { strBuffer = wxString(result->name, wxConvUTF8); } }
false
false
false
false
false
0