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
ungrab_button(guint button, guint state, Window win) { guint i; for (i = 0; i < MASK_LIST_SIZE; ++i) XUngrabButton(obt_display, button, state | mask_list[i], win); }
false
false
false
false
false
0
drawFrame() { int w = 0.05 * m_tileSize + 0.5; w = w < 1 ? 1 : w; m_frame->setRect ( m_topLeftX + (2 * m_tileSize) - (3 * w), m_topLeftY + (2 * m_tileSize) - (3 * w), FIELDWIDTH * m_tileSize + 6 * w, FIELDHEIGHT * m_tileSize + 6 * w); kDebug() << "FRAME WIDTH" << w << "tile size" << m_tileSize << "...
false
false
false
false
false
0
rtp_session_set_sdes_string (RTPSession * sess, GstRTCPSDESType type, const gchar * item) { gboolean result; g_return_val_if_fail (RTP_IS_SESSION (sess), FALSE); RTP_SESSION_LOCK (sess); result = rtp_source_set_sdes_string (sess->source, type, item); RTP_SESSION_UNLOCK (sess); return result; }
false
false
false
false
false
0
ibus_registry_remove_all (IBusRegistry *registry) { g_assert (IBUS_IS_REGISTRY (registry)); g_list_free_full (registry->priv->observed_paths, g_object_unref); registry->priv->observed_paths = NULL; g_list_free_full (registry->priv->components, g_object_unref); registry->priv->components = NULL; }
false
false
false
false
false
0
setUid(const char *name, int uid) { if (setuid(uid) < 0) { logError("setuid(%d) (user %s) failed: %m\n", uid, name); return False; } return True; }
false
false
false
false
false
0
fork2() { pid_t pid; int status; sigset_t set,oset; sigfillset(& set); xprintf (">>>>>>>>Forking<<<<<<<<,\n"); sigprocmask(SIG_SETMASK,&set,&oset); if (!(pid = fork())) { xprintf ("child\n"); switch (fork()) { case 0: xprintf ("child 2\n"); sigprocmask(SIG_SETMASK,&oset,&set); ...
false
false
false
false
false
0
create_dlg_faq (void) { GtkWidget *dlg_faq; GdkPixbuf *dlg_faq_icon_pixbuf; GtkWidget *scrolledwindow80; GtkWidget *textview_faq; dlg_faq = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_name (dlg_faq, "dlg_faq"); gtk_window_set_position (GTK_WINDOW (dlg_faq), GTK_WIN_POS_MOUSE); gtk_window_set_d...
false
false
false
false
false
0
PE7main(pe_data_t *pedata) { int x; for (x = 2; x <= MAXTEST; x++) { if (IsPrime(x)) { primecount++; } if (primecount + 1 >= 10001) { if (pedata->verbosity > 0) printf ("Result: %i\n", x); sprintf(pedata->result, "%i", x); break; } } return 0; }
false
true
false
false
false
1
Draw(wxDC *dc, const wxPlotMarker& marker) { // drawing multiple markers is faster, so just drawing a single one takes a hit wxArrayPlotMarker markers; markers.Add(marker); Draw(dc, markers); }
false
false
false
false
false
0
resend_start(int sig) { if (!got_verification) { unsigned short addr = (local_addr[0] | local_addr[1]<<8); send_start(addr); alarm(10); } }
false
false
false
false
false
0
GetEdgeFlags(char *e) const { if (!isValid()) return false; for (unsigned int i=0;i<edgeFlags.size();i++) e[i] = edgeFlags[i]; return true; }
false
false
false
false
false
0
MeasurePixmap(XmtLayoutWidget lw, XmtLayoutPixmapGadget lp) #else static void MeasurePixmap(lw, lp) XmtLayoutWidget lw; XmtLayoutPixmapGadget lp; #endif { unsigned width, height, depth, border; int x, y; Window dummywin; if (lp->layout_pixmap.pixmap || lp->layout_pixmap.bitmap) { (void)XGetGeometr...
false
false
false
false
false
0
_elm_win_obj_intercept_layer_set(void *data, Evas_Object *obj __UNUSED__, int l) { Elm_Win_Smart_Data *sd = data; TRAP(sd, layer_set, l); }
false
false
false
false
false
0
adjustLabelWidth( QWidget* label, int y, bool adaptToViewport ) { QRect geom = label->geometry(); int neededWidth = label->sizeHint().width(); if ( adaptToViewport ) { int availWidth = viewWidth() - k_marginLeft - ui.albumPic->width() - k_column - k_marginRight; availWidth ...
false
false
false
false
false
0
trackball_projection(G3DVector x, G3DVector y, G3DFloat r) { G3DDouble d, t; d = sqrt(x * x + y * y); if(d < (r * 0.70710678118654752440)) return sqrt(r * r - d * d); t = r / 1.41421356237309504880; return t * t / d; }
false
false
false
false
false
0
model_finish_cloak(int full_cloak) { int unit; if (full_cloak){ unit=0; gr_set_cull(0);} else unit=2; gr_pop_texture_matrix(unit); Interp_multitex_cloakmap=-1; model_set_forced_texture(-1); FULLCLOAK=-1; }
false
false
false
false
false
0
LLVMGetLastGlobal(LLVMModuleRef M) { Module *Mod = unwrap(M); Module::global_iterator I = Mod->global_end(); if (I == Mod->global_begin()) return 0; return wrap(--I); }
false
false
false
false
false
0
edit_person_set_window_title( gint pageNum ) { gchar *sTitle; if( _title_new_ == NULL ) { _title_new_ = g_strdup( _("Add New Person") ); _title_edit_ = g_strdup( _("Edit Person Details") ); } if( pageNum == PAGE_BASIC ) { if( personeditdlg.editNew ) { if (prefs_common.addressbook_use_editaddress_dialog) ...
false
false
false
false
false
0
csnset_insert_csn(CSNSet **csnset, CSNType t, const CSN *csn) { if((csn!=NULL) && (*csnset==NULL)) { csnset_add_csn(csnset, t, csn); } else if(csn!=NULL) { CSNSet *newcsn= (CSNSet*)slapi_ch_malloc(sizeof(CSNSet)); CSNSet *f= csnset_get_previous_csnset_node(*csnset, csn); newcsn->type= t; csn_init_by_csn(...
false
false
false
false
false
0
status_report() { if (param[0] == 5) { // device status report sendBack("\e[0n"); // response 'Terminal OK' } else if (param[0] == 6) { // cursor position report s8 str[32]; snprintf(str, sizeof(str), "\e[%d;%dR", cursor_y + 1, cursor_x + 1); sendBack(str); } }
false
false
false
false
false
0
refineBySet(IList<EquivClass> *classes, const ISet<Char> &set, unsigned setFlag) { Owner<EquivClass> in(new EquivClass), out(new EquivClass); IList<EquivClass> newClasses; for (;;) { EquivClass *p = classes->head(); if (!p) break; if (!out) out = new EquivClass; switch (refine(p->se...
false
false
false
false
false
0
s5m_rtc_stop_alarm(struct s5m_rtc_info *info) { u8 data[info->regs->regs_count]; int ret, i; struct rtc_time tm; ret = regmap_bulk_read(info->regmap, info->regs->alarm0, data, info->regs->regs_count); if (ret < 0) return ret; s5m8767_data_to_tm(data, &tm, info->rtc_24hr_mode); dev_dbg(info->dev, "%s: %d/%...
false
false
false
false
false
0
yajl_gen_string(yajl_gen g, const unsigned char * str, size_t len) { ENSURE_VALID_STATE; INSERT_SEP; INSERT_WHITESPACE; yajl_buf_append(g->buf, "\"", 1); yajl_string_encode(g->buf, str, len); yajl_buf_append(g->buf, "\"", 1); APPENDED_ATOM; FINAL_NEWLINE; return yajl_gen_stat...
false
false
false
false
false
0
possible_places(idx, map, pd) int idx; /* prototype index */ boolean *map; /* array MAXLEVEL+1 in length */ struct proto_dungeon *pd; { int i, start, count; s_level *lev = pd->final_lev[idx]; /* init level possibilities */ for (i = 0; i <= MAXLEVEL; i++) map[i] = FALSE; /* get base an...
false
false
false
false
false
0
setNoPickedSurrogate() // //////////////////////////////////////////////////////////////////////// { // Set the name to be empty surrogateNameInPickOwner = ""; // get rid of old paths if they exist. if ( pathToSurrogatePickOwner != NULL ) { pathToSurrogatePickOwner->unref(); pathToSurrogatePickOwne...
false
false
false
false
false
0
output_epd_writer(FILE* epd_file, at_string name, int llx, int lly, int urx, int ury, at_output_opts_type * opts, spline_list_array_type shape, at_msg_func msg_func, at_address msg_data) { int result; result = output_epd_header(epd_file, name, llx, lly, urx, ury); ...
false
false
false
false
false
0
boot_delay_msec(int level) { unsigned long long k; unsigned long timeout; if ((boot_delay == 0 || system_state != SYSTEM_BOOTING) || (level >= console_loglevel && !ignore_loglevel)) { return; } k = (unsigned long long)loops_per_msec * boot_delay; timeout = jiffies + msecs_to_jiffies(boot_delay); while (k)...
false
false
false
false
false
0
libsyssys_link(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj existing_scm; const char * existing; ScmObj newpath_scm; const char * newpath; ScmObj SCM_SUBRARGS[2]; int SCM_i; SCM_ENTER_SUBR("sys-link"); for (SCM_i=0; SCM_i<2; SCM_i++) { SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i); } existing...
false
false
false
false
false
0
get_locale_info(int type, LocaleInfo *locale_info) { switch (type) { case LT_CURRENT_LOCALE: { struct lconv *locale_data = localeconv(); locale_info->decimal_point = PyUnicode_DecodeLocale( locale_data->decimal_point, ...
false
false
false
false
false
0
processComment(void) { char lastChar; bool loop = TRUE; char oldChar; bool inlineAllowed = FALSE; if (options->inlineComment) { inlineAllowed = isInlineNodeAllowed(); } if (inlineAllowed && !options->oneLineComment) { inlineAllowed = isOnSingleLine(4, '-', '-'); } if (inlineAllowed) { resetB...
false
false
false
false
false
0
move_fd_or_die (int oldfd, int newfd) { if (oldfd != newfd) { if (dup2 (oldfd, newfd) < 0) error (SORT_FAILURE, errno, _("dup2 failed")); close (oldfd); } }
false
false
false
false
false
0
RequestData( vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) { vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkPolyData *input = vtkPolyData::SafeDownCast( inInfo->Get(vtkDataObject::DATA_OBJECT())); vtkCellArray *polys = input->GetP...
false
false
false
false
false
0
FillFrom( const char * c ) { // check whether the passed string is too short for( int i = 0; i < 8; ++i ) { if( !c[i] ) { r_ = g_ = b_ = 0; return; } } r_ = CTR( hex_to_int( c[2] ) *16 + hex_to_int( c[3] ) ); g_ = CTR( hex_to_int( c[4] ) *16 + hex...
false
false
false
false
false
0
generate_code(ste * globals) { stelist * var; // output comment on overall scalarset types on all highest level variables // not necessary, just to help you analyse your variables fprintf(codefile, "/*\n"); set_var_list(globals); for ( var = varlist; var!= NULL; var=var->next ) fprintf(codefile, "%s...
false
false
false
false
false
0
readAndBuildFromStream(mrpt::utils::CStream &in) { int32_t msg_id; in >> msg_id; gnss_message* msg = gnss_message::Factory(static_cast<gnss_message_type_t>(msg_id) ); if (!msg) THROW_EXCEPTION_CUSTOM_MSG1("Error deserializing gnss_message: unknown message type '%i'",static_cast<int>(msg_id)); msg->internal_readF...
false
false
false
false
false
0
build_left_heavy_depth_string( FidtrackerX *ft, Region *r ) { int i; char *result; Region *adjacent; char *p, *p2; //mk assert( ft->next_depth_string < ft->depth_string_count ); result = &ft->depth_strings[ ft->depth_string_length * (ft->next_depth_string++) ]; result[0] = (char)('0' + r->d...
false
false
false
false
true
1
message_log_syslog(int pri, size_t len, const char *fmt, va_list args, int err) { char *buffer; int status; buffer = malloc(len + 1); if (buffer == NULL) { fprintf(stderr, "failed to malloc %lu bytes at %s line %d: %s", (unsigned long) len + 1, __FILE__, __LINE__, strerror(errno...
false
false
false
false
false
0
parse_file (const char *fname) { yybegin (fname); for (;;) { switch (token ()) { case EXTERN: case STATIC: extern_or_static (); break; case STRUCT: case UNION: struct_or_union (); break; case TYPEDEF: typedef_decl (); break; case DEFVEC_OP: case DEFVEC_I: def_vec (); bre...
false
false
false
false
false
0
hasChildren( const QModelIndex & parent ) const { if (!parent.isValid()) return true; const KFileItem& parentItem = static_cast<KDirModelNode*>(parent.internalPointer())->item(); Q_ASSERT(!parentItem.isNull()); return parentItem.isDir(); }
false
false
false
false
false
0
emit_block_move_via_movstr (x, y, size, align) rtx x, y, size; unsigned int align; { /* Try the most limited insn first, because there's no point including more than one in the machine description unless the more limited one has some advantage. */ rtx opalign = GEN_INT (align / BITS_PER_UNIT);...
false
false
false
false
false
0
v4l2_adjust_src_fmt_to_fps(int index, int fps) { struct v4l2_pix_format req_pix_fmt; struct v4l2_format src_fmt; struct v4l2_format dest_fmt = devices[index].dest_fmt; struct v4l2_format orig_src_fmt = devices[index].src_fmt; struct v4l2_format orig_dest_fmt = devices[index].dest_fmt; int r; if (fps == devices[...
false
false
false
false
false
0
write_message(fd, mp) int fd; struct msg *mp; { int len; char* tmp; tmp = (char*) &(mp->len); len = (*tmp * 256) + *(tmp+1); if ((len == 0) || (len > MSG_BODY_SIZE)) { return MSG_HDR_SIZE; } /* cc68k wants (char *) */ if (write(fd, (char *) mp, len + MSG_HDR_SIZE) != len + MSG_HDR_SIZE) {...
false
false
false
false
false
0
cfg_error(cfg_t *cfg, const char *fmt, ...) { va_list ap; va_start(ap, fmt); if(cfg && cfg->errfunc) (*cfg->errfunc)(cfg, fmt, ap); else { if(cfg && cfg->filename && cfg->line) fprintf(stderr, "%s:%d: ", cfg->filename, cfg->line); else if(cfg && cfg->filename) ...
false
false
false
false
false
0
c_ekkclco(const EKKfactinfo *fact,int *hcoli, int *mrstrt, int *hinrow, int xnewro) { #if 0 int *hcoli = fact->xecadr; double *dluval = fact->xeeadr; double *dvalpv = fact->kw3adr; int *mrstrt = fact->xrsadr; int *hrowi = fact->xeradr; int *mcstrt = fact->xcsadr; int *hinrow = fact->xrnadr; int *hincol ...
false
false
false
false
false
0
picfontname(char *psname) { char *rv; fontinfo *p; for (p = fonttab; p->psname; p++) if (strcmp(p->psname, psname) == 0) break; if (p->psname) rv = p->trname; else { agerr(AGERR, "%s%s is not a troff font\n", picgen_msghdr, psname); /* try base font names...
false
false
false
false
false
0
verifyDocument(const OFString &observerName, const DSRCodedEntryValue &observerCode, const OFString &organization, const OFString &dateTime) { OFCondition result = EC_IllegalCall; /* not appli...
false
false
false
false
false
0
make_receipt_request(STACK_OF(OPENSSL_STRING) *rr_to, int rr_allorfirst, STACK_OF(OPENSSL_STRING) *rr_from) { STACK_OF(GENERAL_NAMES) *rct_to, *rct_from; CMS_ReceiptRequest *rr; rct_to = make_names_stack(rr_to); if (!rct_to) goto err; if (rr_from) { rct_from = make_names_stack(rr_from); if (!r...
false
false
false
false
false
0
__aa_kvmalloc(size_t size, gfp_t flags) { void *buffer = NULL; if (size == 0) return NULL; /* do not attempt kmalloc if we need more than 16 pages at once */ if (size <= (16*PAGE_SIZE)) buffer = kmalloc(size, flags | GFP_NOIO | __GFP_NOWARN); if (!buffer) { if (flags & __GFP_ZERO) buffer = vzalloc(size)...
false
false
false
false
false
0
get_ientry(void) { struct ientry *t; if (!ifreelist) { /* create child_table_inc more and add them to the freelist */ struct ientry *n; int i; n = xmalloc(itable_inc * sizeof(struct ientry)); ifreelist = n; for (i = 0; i < itable_inc - 1; i++) { n[i].next = n + (i + 1); } /* i == child_table_inc ...
false
false
false
false
false
0
gog_error_bar_get_minmax (const GogErrorBar *bar, double *min, double *max) { double *values; int i, imax; double tmp_min, tmp_max, plus, minus; g_return_if_fail (GOG_IS_ERROR_BAR (bar)); if (!gog_series_is_valid (bar->series)) { *min = DBL_MAX; *max = -DBL_MAX; return; } imax = go_data_get_vector_size ...
false
false
false
false
false
0
append_options (gchar **a, gchar **b) { gchar **c, **p; if (!a && !b) return NULL; else if (!a) return g_strdupv (b); else if (!b) return g_strdupv (a); c = g_new0 (gchar *, g_strv_length (a) + g_strv_length (b) + ...
false
false
false
false
false
0
_gcry_ecc_eddsa_ensure_compact (gcry_mpi_t value, unsigned int nbits) { gpg_err_code_t rc; const unsigned char *buf; unsigned int rawmpilen; gcry_mpi_t x, y; unsigned char *enc; unsigned int enclen; if (!mpi_is_opaque (value)) return GPG_ERR_INV_OBJ; buf = mpi_get_opaque (value, &rawmpilen); if (...
false
false
false
false
false
0
docg4_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) { int i; struct nand_chip *nand = mtd->priv; uint16_t *p = (uint16_t *) buf; len >>= 1; for (i = 0; i < len; i++) writew(p[i], nand->IO_ADDR_W); }
false
false
false
false
false
0
ia5_validate( struct berval *val ) { int rc = 0; /* assume the value is valid */ int i = 0; if (val == NULL) { rc = 1; goto exit; } /* Per RFC 4517: * * IA5String = *(%x00-7F) */ for (i=0; i < val->bv_len; i++) { if (!IS_UTF1(val->bv_val[i])) { rc = 1; goto exit; } } exit: return r...
false
false
false
false
false
0
dvb_fe_sec_tone(struct dvb_v5_fe_parms *parms, fe_sec_tone_mode_t tone) { int rc; if (parms->verbose) dvb_log( "DiSEqC TONE: %s", fe_tone_name[tone] ); rc = ioctl(parms->fd, FE_SET_TONE, tone); if (rc == -1) dvb_perror("FE_SET_TONE"); return rc; }
false
false
false
false
false
0
parse_slice(const char *q, csepdjvuopts &opts) { int count = 0; int lastx = 0; while (*q) { char *ptr; int x = strtol(q, &ptr, 10); if (ptr == q) G_THROW("csepdjvu: " "illegal quality specification (number expected)"); if (lastx>0 && q[-1]=='+') x += la...
false
false
false
false
false
0
fixSize() { // m_last_resize_w / m_last_resize_h could be negative // due to user interactions. check here and limit unsigned int w = 1; unsigned int h = 1; if (m_last_resize_w > 0) w = m_last_resize_w; if (m_last_resize_h > 0) h = m_last_resize_h; frame().applySizeHints(w,...
false
false
false
false
false
0
multiplicity(PolynomialSet const &g) { PolynomialSet g2=idealWithSameMultiplicity(g); log3 AsciiPrinter(Stderr).printPolynomialSet(g2); PolynomialSet g3=nonHomogeneousSaturation(g2); log3 AsciiPrinter(Stderr).printPolynomialSet(g3); return numberOfStandardMonomials(g3); }
false
false
false
false
false
0
wake_up_worker(struct worker_pool *pool) { struct worker *worker = first_idle_worker(pool); if (likely(worker)) wake_up_process(worker->task); }
false
false
false
false
false
0
sys_poll_togui(void) /* returns 1 if did anything */ { if (sys_nogui) return (0); /* see if there is stuff still in the buffer, if so we must have fallen behind, so just try to clear that. */ if (sys_flushtogui()) return (1); /* if the flush wasn't complete, wait. */ ...
false
false
false
false
false
0
convertInitializerBitRange(const std::vector<unsigned> &Bits) const { SmallVector<Init *, 16> NewBits(Bits.size()); for (unsigned i = 0, e = Bits.size(); i != e; ++i) { if (Bits[i] >= 64) return 0; NewBits[i] = BitInit::get(Value & (INT64_C(1) << Bits[i])); } return BitsInit::get(NewBits); }
false
false
false
false
false
0
gfs_normal_divergence (FttCell * cell, GfsVariable * v) { FttCellFace face; gdouble div = 0.; g_return_if_fail (cell != NULL); g_return_if_fail (v != NULL); face.cell = cell; for (face.d = 0; face.d < FTT_NEIGHBORS; face.d++) div += (FTT_FACE_DIRECT (&face) ? 1. : -1.)* GFS_STATE (cell)->...
false
false
false
false
false
0
judge_ucs(ptr) char_u * ptr; { short_u ucs; char_u dst[2]; if (ptr[0] < 0xe0) ucs = ((ptr[0] & 0x1f) << 6) | (ptr[1] & 0x3f); else ucs = ((ptr[0] & 0x0f) << 12) | ((ptr[1] & 0x3f) << 6) | (ptr[2] & 0x3f); dst[1] = ucs & 255; dst[0] = ucs >> 8; if (wide2multi(dst, 2, TRUE, FALSE) == 1 && dst[0] == '?') ret...
false
false
false
false
false
0
cheese_camera_device_update_format_table (CheeseCameraDevice *device) { CheeseCameraDevicePrivate *priv = device->priv; guint i; guint num_structures; free_format_list (device); num_structures = gst_caps_get_size (priv->caps); for (i = 0; i < num_structures; i++) { GstStructure *structure; cons...
false
false
false
false
false
0
axis_abbreviation(PermString atype) { if (atype == "Weight") return "wt"; else if (atype == "Width") return "wd"; else if (atype == "OpticalSize") return "op"; else if (atype == "Style") return "st"; else return atype; }
false
false
false
false
false
0
efx_check_disabled(struct efx_nic *efx) { if (efx->state == STATE_DISABLED || efx->state == STATE_RECOVERY) { netif_err(efx, drv, efx->net_dev, "device is disabled due to earlier errors\n"); return -EIO; } return 0; }
false
false
false
false
false
0
pcmcia_release_window(struct pcmcia_device *p_dev, struct resource *res) { struct pcmcia_socket *s = p_dev->socket; pccard_mem_map *win; unsigned int w; dev_dbg(&p_dev->dev, "releasing window %pR\n", res); w = ((res->flags & IORESOURCE_BITS & WIN_FLAGS_REQ) >> 2) - 1; if (w >= MAX_WIN) return -EINVAL; mutex...
false
false
false
false
false
0
nss_load_cert(struct ssl_connect_data *ssl, const char *filename, PRBool cacert) { CURLcode err = (cacert) ? CURLE_SSL_CACERT_BADFILE : CURLE_SSL_CERTPROBLEM; /* libnsspem.so leaks memory if the requested file does not exist. For more * details, go to <https://bugzilla.red...
false
false
false
false
false
0
make(std::vector<RefAST> nodes) { if ( nodes.size()==0 ) return RefAST(0); RefAST root = nodes[0]; RefAST tail = RefAST(0); if (root) { root->setFirstChild(RefAST(0)); // don't leave any old pointers set } // link in children; for (unsigned int i=1; i<nodes.size(); i++) { if ( !nodes[i] ) continue; // igno...
false
false
false
false
false
0
gfs_domain_stats_solid (GfsDomain * domain) { GtsRange s; g_return_val_if_fail (domain != NULL, s); gts_range_init (&s); gfs_domain_traverse_mixed (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, (FttCellTraverseFunc) add_stats_solid, &s); domain_range_reduce (domain, &s); gts_range_update (&s); retu...
false
false
false
false
false
0
property_length(uint16_t propaddr) { uint16_t length; /* The address is to the data; the size byte is right before. */ uint8_t byte = user_byte(propaddr - 1); if(zversion <= 3) { length = (byte >> 5) + 1; } else { if(byte & 0x80) { length = byte & 0x3f; if(length == 0) length = ...
false
false
false
false
false
0
value(const String &formal, bool &found) const { const VariableEnvironment *v = this; while (v) { for (int i = 0; i < v->_names.size(); i++) if (v->_names[i] == formal) { found = true; return v->_values[i]; } v = v->_parent; } found = false; return String::empty_string(); }
false
false
false
false
false
0
remove(Pixmap p) { ImageHolder* doomed; if (_table.find(doomed, p)) { _table.remove(p); delete doomed; } }
false
false
false
false
false
0
blogc_content_render_html(blogc_content_node_t *ast, char *nl, char **excerpt, char **description) { sb_string_t *rv = sb_string_new(); char *tmp = NULL; for (blogc_content_node_t *l = ast; l != NULL; l = l->next) { switch (l->node_type) { case BLOGC_CONTENT_BLOCK: sw...
false
false
false
false
false
0
folks_role_is_empty (FolksRole* self) { gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; const gchar* _tmp2_ = NULL; const gchar* _tmp3_ = NULL; gboolean _tmp6_ = FALSE; gboolean _tmp9_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); _tmp2_ = folks_role_get_organisation_name (sel...
false
false
false
false
false
0
setSectionAlignmentForBundling(const MCAssembler &Assembler, MCSection *Section) { if (Section && Assembler.isBundlingEnabled() && Section->hasInstructions() && Section->getAlignment() < Assembler.getBundleAlignSize()) Section->setAlignment(Assembler.getBundleAlign...
false
false
false
false
false
0
toString(InputLanguage lang) const { if(isNull()) return "Null"; ostringstream ss; ExprStream os(getEM()); os.lang(lang); os.os(ss); os << (*this); return ss.str(); }
false
false
false
false
false
0
vtkPythonGetValue(PyObject *o, long &a) { VTK_PYTHON_FLOAT_CHECK(); a = PyInt_AsLong(o); return (a != -1 || !PyErr_Occurred()); }
false
false
false
false
false
0
cbz_read_zip_dir(cbz_document *doc) { fz_stream *file = doc->file; unsigned char buf[512]; int filesize, back, maxback; int i, n; fz_seek(file, 0, 2); filesize = fz_tell(file); maxback = fz_mini(filesize, 0xFFFF + sizeof buf); back = fz_mini(maxback, sizeof buf); while (back < maxback) { fz_seek(file, fi...
true
true
false
false
false
1
sync_srch_refresh_pre_search(Slapi_PBlock *pb) { LDAPControl **requestcontrols; struct berval *psbvp; Sync_Cookie *client_cookie = NULL; Sync_Cookie *session_cookie = NULL; int rc = 0; int sync_persist = 0; PRThread *tid = NULL; int entries_sent = 0; slapi_pblock_get (pb, SLAPI_REQCONTROLS, &requestcontrols...
false
false
false
false
false
0
luaL_pushmodule (lua_State *L, const char *modname, int sizehint) { luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 1); /* get _LOADED table */ lua_getfield(L, -1, modname); /* get _LOADED[modname] */ if (!lua_istable(L, -1)) { /* not found? */ lua_pop(L, 1); /* remove pre...
false
false
false
false
false
0
mdb_index_find_row(MdbHandle *mdb, MdbIndex *idx, MdbIndexChain *chain, guint32 pg, guint16 row) { MdbIndexPage *ipg; int passed = 0; guint32 pg_row = (pg << 8) | (row & 0xff); guint32 datapg_row; ipg = mdb_index_read_bottom_pg(mdb, idx, chain); do { ipg->len = 0; /* * if no more rows on this leaf, try t...
false
false
false
false
false
0
GetPredictionCostCrossColorBlue( const uint32_t* argb, int stride, int tile_width, int tile_height, VP8LMultipliers prev_x, VP8LMultipliers prev_y, int green_to_blue, int red_to_blue, const int accumulated_blue_histo[256]) { int histo[256] = { 0 }; float cur_diff; VP8LCollectColorBlueTransforms(argb,...
false
false
false
false
false
0
_dbus_gtype_to_signature (GType gtype) { char *ret; DBusGTypeMarshalData *typedata; if (dbus_g_type_is_collection (gtype)) { GType elt_gtype; char *subsig; elt_gtype = dbus_g_type_get_collection_specialization (gtype); subsig = _dbus_gtype_to_signature (elt_gtype); ret = g_strc...
false
false
false
false
false
0
user_set_xhas_messages (AccountsUser *auser, GDBusMethodInvocation *context, gboolean has_messages) { User *user = (User*)auser; int uid; const gchar *action_id; if (!get_caller_uid (context, &uid)) { ...
false
false
false
false
false
0
cdce925_pll_find_rate(unsigned long rate, unsigned long parent_rate, u16 *n, u16 *m) { unsigned long un; unsigned long um; unsigned long g; if (rate <= parent_rate) { /* Can always deliver parent_rate in bypass mode */ rate = parent_rate; *n = 0; *m = 0; } else { /* In PLL mode, need to apply min/max ...
false
false
false
false
false
0
servers_callback(struct widget *pWidget) { if (Main.event.button.button == SDL_BUTTON_LEFT) { bool lan_scan = (pWidget->ID != ID_JOIN_META_GAME); popdown_start_menu(); popup_connection_dialog(lan_scan); } return -1; }
false
false
false
false
false
0
CreateTree(Pointer pixdata, int knt, int nColors, int float_pixels) { TreeNode tree = NULL; struct color pbuf; int skipsize; ubyte *u_pixdata = (ubyte *)pixdata; int i, j; if (float_pixels) skipsize = skip*3*sizeof(float); else skipsize = skip*sizeof(struct color); for ...
false
false
false
false
false
0
intel_th_gth_assign(struct intel_th_device *thdev, struct intel_th_device *othdev) { struct gth_device *gth = dev_get_drvdata(&thdev->dev); int i, id; if (othdev->type != INTEL_TH_OUTPUT) return -EINVAL; for (i = 0, id = 0; i < TH_POSSIBLE_OUTPUTS; i++) { if (gth->output[i].port_type != othdev->outp...
false
false
false
false
false
0
catch () { errno = 0; if (o_verbose > 1) /* normally we don't care */ bail (wrote_txt, wrote_net, wrote_out); bail (" punt!"); }
false
false
false
false
false
0
ath_is_mybeacon(struct ath_common *common, struct ieee80211_hdr *hdr) { return ieee80211_is_beacon(hdr->frame_control) && !is_zero_ether_addr(common->curbssid) && ether_addr_equal_64bits(hdr->addr3, common->curbssid); }
false
false
false
false
false
0
jdns_packet_question_copy(const jdns_packet_question_t *a) { jdns_packet_question_t *c = jdns_packet_question_new(); if(a->qname) c->qname = jdns_string_copy(a->qname); c->qtype = a->qtype; c->qclass = a->qclass; return c; }
false
false
false
false
false
0
zxid_free_conf(zxid_conf *cf) { zxid_free_need(cf, cf->need); zxid_free_need(cf, cf->want); zxid_free_atsrc(cf, cf->attrsrc); zxid_free_bus_url(cf, cf->bus_url); zxid_free_map(cf, cf->inmap); zxid_free_map(cf, cf->outmap); zxid_free_map(cf, cf->pepmap); zxid_free_map(cf, cf->pepmap_rqout); zxid_free_m...
false
false
false
false
false
0
Fstrscan(argn) int argn; { truc *argptr; byte *str, *bag, *sep; int flg, tst, ch; int k, len, len2, pos; word4 sep4[64]; /* space for 256 bytes */ word4 *pt4; word4 fill; if(argn == 3 && (*argStkPtr == zero || *argStkPtr == false)) { fill = 0xFFFFFFFF; tst = 0; } els...
false
false
false
false
false
0
visitCallSite(CallSite CS) { const AllocFnsTy *FnData = getAllocationData(CS.getInstruction(), AnyAlloc, TLI); if (!FnData) return unknown(); // handle strdup-like functions separately if (FnData->AllocTy == StrDupLike) { // TODO return unknown(); } ...
false
false
false
false
false
0
lsr_write_content_type(GF_LASeRCodec *lsr, SVG_String *type, const char *name) { if (type) { GF_LSR_WRITE_INT(lsr, 1, 1, "hasType"); lsr_write_byte_align_string(lsr, *type, "type"); } else { GF_LSR_WRITE_INT(lsr, 0, 1, "hasType"); } }
false
false
false
false
false
0
buffer_release (buffer_t * buffer) { /* VALUE is malloc'd only if BUFFER->LOWER_CASE */ if (buffer->lower_case) free (buffer->value); /* I don't know how this one should be used */ /* obstack_free (&buffer->obstack, NULL); */ }
false
false
false
false
false
0
rmaliases(void) { struct alias *ap, **app; int i; INT_OFF; for (i = 0; i < ATABSIZE; i++) { app = &atab[i]; for (ap = *app; ap; ap = *app) { *app = freealias(*app); if (ap == *app) { app = &ap->next; } } } INT_ON; }
false
false
false
false
false
0
put_v4l2_input32(struct v4l2_input *kp, struct v4l2_input32 __user *up) { if (copy_to_user(up, kp, sizeof(struct v4l2_input32))) return -EFAULT; return 0; }
false
false
false
false
false
0
mp_clear (mp_int * a) { volatile mp_digit *p; int len; /* only do anything if a hasn't been freed previously */ if (a->dp != NULL) { /* first zero the digits */ len = a->alloc; p = a->dp; while (len--) { *p++ = 0; } /* free ram */ XFREE(a->dp); /* reset members to make debugging easier ...
false
false
false
false
false
0