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
ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw) { s32 status = 0; u16 autoneg_reg = IXGBE_MII_AUTONEG_REG; bool autoneg = false; ixgbe_link_speed speed; ixgbe_get_copper_link_capabilities_generic(hw, &speed, &autoneg); if (speed & IXGBE_LINK_SPEED_10GB_FULL) { /* Set or unset auto-negotiation 10G advertisem...
false
false
false
false
false
0
carl9170_init_phy(struct ar9170 *ar, enum ieee80211_band band) { int i, err; u32 val; bool is_2ghz = band == IEEE80211_BAND_2GHZ; bool is_40mhz = conf_is_ht40(&ar->hw->conf); carl9170_regwrite_begin(ar); for (i = 0; i < ARRAY_SIZE(ar5416_phy_init); i++) { if (is_40mhz) { if (is_2ghz) val = ar5416_phy_i...
false
false
false
false
false
0
compare_ids(u_int8_t *id1, u_int8_t *id2, size_t idlen) { int id1_type, id2_type; id1_type = GET_ISAKMP_ID_TYPE(id1); id2_type = GET_ISAKMP_ID_TYPE(id2); return id1_type == id2_type ? memcmp(id1 + ISAKMP_ID_DATA_OFF, id2 + ISAKMP_ID_DATA_OFF, idlen - ISAKMP_ID_DATA_OFF) : -1; }
false
false
false
false
false
0
read_data(char *buf, int *result, unsigned int max_size) { int i; int status; // Temporary hack; read one character at a time so that // we don't lose track of which line we're reading. max_size = 1; // Invoke the read callback status = input_callback(buf, max_size, input_callback_handle); parse_assert(sta...
false
false
false
false
false
0
excludeItems(QHash<QString,KService::Ptr>& items1, const QHash<QString,KService::Ptr>& items2) { foreach (const KService::Ptr &p, items2) items1.remove(p->menuId()); }
false
false
false
false
false
0
net_write(UPSCONN_t *ups, const char *buf, size_t buflen) { int ret; #ifdef WITH_SSL if (ups->ssl) { #ifdef WITH_OPENSSL ret = SSL_write(ups->ssl, buf, buflen); #elif defined(WITH_NSS) /* WITH_OPENSSL */ ret = PR_Write(ups->ssl, buf, buflen); #endif /* WITH_OPENSSL | WITH_NSS */ if (ret < 1) { ups->upserro...
false
false
false
false
false
0
gdl_dock_master_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GdlDockMaster *master = GDL_DOCK_MASTER (object); switch (prop_id) { case PROP_DEFAULT_TIT...
false
false
false
false
false
0
H5P_set_multi_type(H5P_genplist_t *plist, H5FD_mem_t type) { herr_t ret_value=SUCCEED; FUNC_ENTER_NOAPI(H5P_set_multi_type, FAIL); if( TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS) ) { if(H5P_set(plist, H5F_ACS_MULTI_TYPE_NAME, &type) < 0) HGOTO_ERROR(H5E_PLIST, H5E...
false
false
false
false
false
0
construct_linear_table(struct table *table, const struct linear_element *strings, long size) { long i; table->size = size; table->strings = gw_malloc(size * (sizeof table->strings[0])); table->numbers = NULL; table->versions = gw_malloc(size * (sizeof table->vers...
false
false
false
false
false
0
FFCEUX_PPURead_Default(uint32 A) { uint32 tmp = A; if (PPU_hook) PPU_hook(A); if (tmp < 0x2000) { return VPage[tmp >> 10][tmp]; } else if (tmp < 0x3F00) { return vnapage[(tmp >> 10) & 0x3][tmp & 0x3FF]; } else { uint8 ret; if (!(tmp & 3)) { if (!(tmp & 0xC)) ret = PALRAM[0x00]; el...
false
false
false
false
false
0
test_read_wrong_master (Test *test, gconstpointer unused) { GkmDataResult res; GkmSecret *master; master = gkm_secret_new_from_password ("wrong"); gkm_secret_data_set_master (test->sdata, master); g_object_unref (master); res = check_read_keyring_file (test, SRCDIR "/files/encrypted.keyring"); g_assert (res ==...
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)); QGeoAreaMonitor *_t = static_cast<QGeoAreaMonitor *>(_o); switch (_id) { case 0: _t->areaEntered((*reinterpret_cast< const QGeoP...
false
false
false
false
false
0
_non_existent() { if( _NP_is_nil() ) _CORBA_invoked_nil_pseudo_ref(); omni_tracedmutex_lock sync(pd_lock); return pd_destroyed ? 1 : 0; }
false
false
false
false
false
0
btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset) { struct extent_map *em; struct map_lookup *map; struct btrfs_mapping_tree *map_tree = &root->fs_info->mapping_tree; int readonly = 0; int miss_ndevs = 0; int i; read_lock(&map_tree->map_tree.lock); em = lookup_extent_mapping(&map_tree->map_tree, ...
false
false
false
false
false
0
rb_mod_include_p(mod, mod2) VALUE mod; VALUE mod2; { VALUE p; Check_Type(mod2, T_MODULE); for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) { if (BUILTIN_TYPE(p) == T_ICLASS) { if (RBASIC(p)->klass == mod2) return Qtrue; } } return Qfalse; }
false
false
false
false
false
0
init_mem(compress_io *cio, FILE *in_fp, int in_size, FILE *out_fp, int out_size) { cio->in = (mem_mgr *) malloc(sizeof(mem_mgr)); if (!cio->in) err_exit(BUFFER_ALLOC_ERR); cio->in->set = (UINT8 *) malloc(sizeof(UINT8) * in_size); if (!cio->in->set) err_exit(BUFFER_ALLOC_...
false
true
false
true
false
1
unparse_WKT(LWGEOM_UNPARSER_RESULT *lwg_unparser_result, uchar* serialized, allocator alloc, freeor free, int flags) { LWDEBUGF(2, "unparse_WKT called with parser flags %d.", flags); if (serialized==NULL) return 0; /* Setup the inital parser flags and empty the return struct */ current_lwg_unparser_resu...
false
false
false
false
false
0
Disturbance(real lon, real& deltax, real& deltay, real& deltaz) const throw() { real clam, slam, M[Geocentric::dim2_]; CircularEngine::cossin(lon, clam, slam); real Tres = InternalT(clam, slam, deltax, deltay, deltaz, true, true); Geocentric::Rotation(_sphi, _cphi...
false
false
false
false
false
0
mailimap_struct_list_send(mailstream * fd, clist * list, char symbol, mailimap_struct_sender * sender) { clistiter * cur; void * elt; int r; cur = clist_begin(list); if (cur == NULL) return MAILIMAP_NO_ERROR; elt = clist_content(cur); r = (* sender)(fd, elt); if (r != MAILIMAP_NO_ERROR)...
false
false
false
false
false
0
mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb, struct mei_cl_cb *cmpl_list) { struct mei_device *dev; struct mei_msg_data *buf; struct mei_msg_hdr mei_hdr; size_t len; u32 msg_slots; int slots; int rets; bool first_chunk; if (WARN_ON(!cl || !cl->dev)) return -ENODEV; dev = cl->dev; buf...
false
false
false
false
false
0
Execute(const std::string &cmd, ExecuteFlags flags) throw() { int ret = -1; try { // use simpler system() calls whenever we don't want to capture // output, because it means that output is sent to the user // directly if (((flags & EXECUTE_NO_STDERR) || !LogRedirect::redirecting...
false
false
false
false
false
0
sparse_matvec( sparse_matrix *A, double *x, double *b ) { int i, j, itr_j; for( i = 0; i < n; ++i ) b[i] = eta[ atom->type[i] ] * x[i]; for( i = n; i < N; ++i ) b[i] = 0; for( i = 0; i < n; ++i ) { for( itr_j=A->firstnbr[i]; itr_j<A->firstnbr[i]+A->numnbrs[i]; itr_j++) { j = A->jlist[itr_j];...
false
false
false
false
false
0
realloc(CVmVarHeapHybrid_hdr *mem, size_t siz, CVmObject *obj) { void *new_mem; /* * if the new block fits in our cell size, return the original * memory unchanged; note that we must adjust the pointer so that we * return the client-visible...
false
false
false
false
false
0
ndma_session_distribute_quantum (struct ndm_session *sess) { int total_did_something = 0; int did_something; do { did_something = 0; did_something |= ndmis_quantum (sess); #ifndef NDMOS_OPTION_NO_TAPE_AGENT if (sess->tape_acb.mover_state.state != NDMP9_MOVER_STATE_IDLE) did_something |= ndmta_quantum (...
false
false
false
false
false
0
GetInetAddr(char *host) { struct in_addr addr; struct hostent *hp; addr.s_addr = inet_addr(host); if ((addr.s_addr == INADDR_NONE) || (addr.s_addr == 0)) { if ((hp = gethostbyname(host)) == 0) { snprintf(OUTPUT,CF_BUFSIZE,"\nhost not found: %s\n",host); FatalError(OUTPUT); } i...
false
false
false
true
false
1
scalar_clone(eval_scalar *result, const eval_scalar *s) { switch (s->type) { case SCALAR_INT: { *result = *s; break; } case SCALAR_STR: { *result = *s; result->scalar.str.value = ht_malloc(result->scalar.str.len); memcpy(result->scalar.str.value, s->scalar.str.value, result->scalar.str.len); break; } ...
false
false
false
false
false
0
localTime(const Date& date, hourTy h, minuteTy m, secondTy s) /* Return a local Time for the specified Standard Time date, hour, minute, and second. */ { clockTy t = (seconds_in_day*(date-refDate) + 60L*60L*h + 60L*m + s); if ( !date.between(refDate,maxDate) || (TIME_ZONE < 0 && t < -TIME_ZONE) ) fprintf(stder...
false
false
false
false
false
0
sca3000_rb_allocate(struct iio_dev *indio_dev) { struct iio_buffer *buf; struct iio_hw_buffer *ring; ring = kzalloc(sizeof(*ring), GFP_KERNEL); if (!ring) return NULL; ring->private = indio_dev; buf = &ring->buf; buf->stufftoread = 0; buf->length = 64; buf->attrs = sca3000_ring_attributes; iio_buffer_init...
false
false
false
false
false
0
_e_gadcon_client_cb_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) { Evas_Event_Mouse_Up *ev; E_Gadcon_Client *gcc; ev = event_info; gcc = data; if ((ev->button == 1) && (gcc->gadcon->instant_edit)) { if (gcc->instant_edit_timer) { ...
false
false
false
false
false
0
init_wrap(int argc, char **argv) { struct init_options opt; int ret; int optidx = 0; struct getargs args[] = { { "realm-max-ticket-life", 0, arg_string, NULL, "realm max ticket lifetime", NULL }, { "realm-max-renewable-life", 0, arg_string, NULL, "realm max renewable lifetime", NULL }, ...
false
false
false
false
false
0
get_genl_kind(char *str) { void *dlh; char buf[256]; struct genl_util *f; for (f = genl_list; f; f = f->next) if (strcmp(f->name, str) == 0) return f; snprintf(buf, sizeof(buf), "%s.so", str); dlh = dlopen(buf, RTLD_LAZY); if (dlh == NULL) { dlh = BODY; if (dlh == NULL) { dlh = BODY = dlopen(NULL, ...
false
false
false
false
false
0
_chm_parse_UTF8(UChar **pEntry, UInt64 count, char *path) { /* XXX: implement UTF-8 support, including a real mapping onto * ISO-8859-1? probably there is a library to do this? As is * immediately apparent from the below code, I'm presently not doing * any special handling for files ...
false
false
false
false
false
0
gcr_simple_certificate_new (const guchar *data, gsize n_data) { GcrSimpleCertificate *cert; g_return_val_if_fail (data, NULL); g_return_val_if_fail (n_data, NULL); cert = g_object_new (GCR_TYPE_SIMPLE_CERTIFICATE, NULL); cert->pv->data = cert->pv->owned = g_memdup (data, n_data); ce...
false
false
false
false
false
0
FormatTimeInMillisAsSeconds(TimeInMillis ms) { ::std::stringstream ss; ss << ms/1000.0; return ss.str(); }
false
false
false
false
false
0
checkAlignmentRadioButtons() { static std::map<LyXAlignment, QString> labelMap_; if (labelMap_.empty()) { labelMap_[LYX_ALIGN_BLOCK] = qt_("Justified"); labelMap_[LYX_ALIGN_LEFT] = qt_("Left"); labelMap_[LYX_ALIGN_RIGHT] = qt_("Right"); labelMap_[LYX_ALIGN_CENTER] = qt_("Center"); } RadioMap::iterator ...
false
false
false
false
false
0
speedportReconnect( struct sProfile *psProfile ) { struct sUrlHandler *psHandler; gchar anUrl[ BUF_SIZE ]; gint nError = -1; if( routerLogin( psProfile ) != 0 ) { return nError; } /* Disconnect */ snprintf( anUrl, sizeof( anUrl ), "%s%s/cgi-bin/webcm", getRouterProtocol( psProfile ), routerGetHost( psProfile...
false
false
false
false
false
0
ast_cdr_dup(struct ast_cdr *cdr) { struct ast_cdr *newcdr; if (!cdr) /* don't die if we get a null cdr pointer */ return NULL; newcdr = ast_cdr_alloc(); if (!newcdr) return NULL; memcpy(newcdr, cdr, sizeof(*newcdr)); /* The varshead is unusable, volatile even, after the memcpy so we take care of that here *...
false
false
false
false
false
0
musb_g_init_endpoints(struct musb *musb) { u8 epnum; struct musb_hw_ep *hw_ep; unsigned count = 0; /* initialize endpoint list just once */ INIT_LIST_HEAD(&(musb->g.ep_list)); for (epnum = 0, hw_ep = musb->endpoints; epnum < musb->nr_endpoints; epnum++, hw_ep++) { if (hw_ep->is_shared_fifo /* || !epn...
false
false
false
false
false
0
make_option_str_with_ver(char **argv,int argc, char *version){ char *op_str; int len=0; int i; for(i=0;i<argc;i++){ len += strlen(argv[i]); } len += (strlen(version) + 2); len += argc-1; op_str = (char *)malloc(sizeof(char)*(len+1)); if(op_str == NULL){ fatal("not enough m...
false
false
false
false
false
0
qla2x00_issue_marker(scsi_qla_host_t *vha, int ha_locked) { if (ha_locked) { if (__qla2x00_marker(vha, vha->req, vha->req->rsp, 0, 0, MK_SYNC_ALL) != QLA_SUCCESS) return QLA_FUNCTION_FAILED; } else { if (qla2x00_marker(vha, vha->req, vha->req->rsp, 0, 0, MK_SYNC_ALL) != QLA_SUCCESS) return QLA_FUN...
false
false
false
false
false
0
remove(const Identifier &name) { assert(!name.isNull()); checkConsistency(); UString::Rep *rep = name._ustring.rep(); UString::Rep *key; if (!m_usingTable) { #if USE_SINGLE_ENTRY key = m_singleEntryKey; if (rep == key) { key->deref(); m_singleEntryKey = 0;...
false
false
false
false
false
0
strbuffer (unsigned long size) { if (size > lbuffer.max) { /* ANSI "realloc" doesn't need this test, but some machines (Sun!) don't follow ANSI */ lbuffer.b = (lbuffer.b) ? realloc(lbuffer.b, lbuffer.max=size) : malloc(lbuffer.max=size); if (lbuffer.b == NULL) lu...
false
false
false
false
false
0
kFirstNode(state_t *s, int funct_nr, int argc, reg_t *argv) { list_t *l = LOOKUP_NULL_LIST(argv[0]); if (l && !sane_listp(s, argv[0])) SCIkwarn(SCIkERROR,"List at "PREG" is not sane anymore!\n", PRINT_REG(argv[0])); if (l) return l->first; else return NULL_REG; }
false
false
false
false
false
0
soap_fdelete(struct soap_clist *p) { switch (p->type) { case SOAP_TYPE_ns__Object: if (p->size < 0) SOAP_DELETE((ns__Object*)p->ptr); else SOAP_DELETE_ARRAY((ns__Object*)p->ptr); break; case SOAP_TYPE_ns__Shape: if (p->size < 0) SOAP_DELETE((ns__Shape*)p->ptr); else SOAP_DELETE_ARRAY((ns__Shape...
false
false
false
false
false
0
do_layer1(PMPSTR mp, unsigned char *pcm_sample, int *pcm_point) { int clip = 0; unsigned int balloc[2 * SBLIMIT]; unsigned int scale_index[2][SBLIMIT]; real fraction[2][SBLIMIT]; struct frame *fr = &(mp->fr); int i, stereo = fr->stereo; int single = fr->single; fr->jsboun...
false
false
false
false
false
0
options_add_filter(obj_list_t *obj_list, int n_objs, filter_info_t filt, pack_opttbl_t *table ) { unsigned int i, I; int j, added=0, found=0; /* increase the size of the collection by N_OBJS if necessary */ if (table->nelems...
false
false
false
false
false
0
set_statusline_mode(VMG_ int mode) { CVmFormatterDisp *str; /* * if we're switching into statusline mode, and we don't have a * statusline stream yet, create one */ if (mode && statline_str_ == 0) { /* create and initialize the statusline stream */ statli...
false
false
false
false
false
0
php_libxml_clear_object(php_libxml_node_object *object TSRMLS_DC) { if (object->properties) { object->properties = NULL; } php_libxml_decrement_node_ptr(object TSRMLS_CC); return php_libxml_decrement_doc_ref(object TSRMLS_CC); }
false
false
false
false
false
0
matrix_row_sub_index(matrix_t *A, matrix_t *s) { int i, j, k; matrix_t *sub = matrix_alloc(s->nrows, A->ncols); k = 0; for (i = 0; i < A->nrows; ++i){ if(i == (int)s->data[k][0]) { for (j = 0; j < A->ncols; ++j) sub->data[k][j] = A->data[i][j]; ++k; ...
false
false
false
false
false
0
probe_lvm2(blkid_probe pr, const struct blkid_idmag *mag) { int sector = mag->kboff << 1; struct lvm2_pv_label_header *label; char uuid[LVM2_ID_LEN + 7]; unsigned char *buf; buf = blkid_probe_get_buffer(pr, mag->kboff << 10, 512 + sizeof(struct lvm2_pv_label_header)); if (!buf) return -1; /* buf is at ...
false
false
false
false
false
0
snd_intel8x0_setup_periods(struct intel8x0 *chip, struct ichdev *ichdev) { int idx; u32 *bdbar = ichdev->bdbar; unsigned long port = ichdev->reg_offset; iputdword(chip, port + ICH_REG_OFF_BDBAR, ichdev->bdbar_addr); if (ichdev->size == ichdev->fragsize) { ichdev->ack_reload = ichdev->ack = 2; ichdev->fragsiz...
false
false
false
false
false
0
client_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc, gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata) { int ret = -1; clnt_conf_t *conf = NULL; rpc_clnt_procedure_t *proc = NULL; clnt_args_t args = {0,}; conf = this->private; ...
false
false
false
false
false
0
PR_FreeAddrInfo(PRAddrInfo *ai) { #if defined(_PR_HAVE_GETADDRINFO) #if defined(_PR_INET6_PROBE) if (!_pr_ipv6_is_present()) PR_Free((PRAddrInfoFB *) ai); else #endif FREEADDRINFO((PRADDRINFO *) ai); #else PR_Free((PRAddrInfoFB *) ai); #endif }
false
false
false
false
false
0
uih_replayenable(struct uih_context *uih, xio_file f, xio_constpath filename, int animr) { struct uih_playcontext *p; const char *s; if (uih->play) { uih_error(uih, gettext("Replay is already active")); return 0; } if (f == XIO_FAILED) { uih_error(uih, gettext("File open failed")); return 0; ...
false
false
false
false
false
0
calibrate_button_clicked_cb (GtkButton *button, CcWacomPage *page) { int i, calibration[4]; GVariant *variant; int *current; gsize ncal; gint monitor; monitor = gsd_wacom_device_get_display_monitor (page->priv->stylus); if (monitor < 0) { /* The display the tablet should be mapped to could not be lo...
false
false
false
false
false
0
add_index_file(const char *path, unsigned mode, void *buf, unsigned long size) { struct stat st; struct cache_entry *ce; int namelen = strlen(path); unsigned ce_size = cache_entry_size(namelen); if (!update_index) return; ce = xcalloc(1, ce_size); memcpy(ce->name, path, namelen); ce->ce_mode = create_ce_mod...
false
false
false
false
false
0
Sop_rgb18_Kto_Dacc( GenefxState *gfxs ) { int w = gfxs->length; GenefxAccumulator *D = gfxs->Dacc; u8 *S = gfxs->Sop[0]; u32 Skey = gfxs->Skey; while (w--) { u8 s0 = S[0]; u8 s1 = S[1]; u8 s2 = S[2]; ...
false
false
false
false
false
0
rv34_pred_b_vector(int A[2], int B[2], int C[2], int A_avail, int B_avail, int C_avail, int *mx, int *my) { if(A_avail + B_avail + C_avail != 3){ *mx = A[0] + B[0] + C[0]; *my = A[1] + B[1] + C[1]; if(A_avail + B_ava...
false
false
false
false
false
0
SelectSectionForGlobal( const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const { checkMachOComdat(GV); // Handle thread local data. if (Kind.isThreadBSS()) return TLSBSSSection; if (Kind.isThreadData()) return TLSDataSection; if (Kind.isText()) return GV->isWeakFo...
false
false
false
false
false
0
b43legacy_write_initvals(struct b43legacy_wldev *dev, const struct b43legacy_iv *ivals, size_t count, size_t array_size) { const struct b43legacy_iv *iv; u16 offset; size_t i; bool bit32; BUILD_BUG_ON(sizeof(struct b43legacy_iv) != 6); iv = ivals; for (i = 0; i < count; i++) { if (arra...
false
false
false
false
false
0
_ar_card_theme_info_collate (const ArCardThemeInfo *a, const ArCardThemeInfo *b) { g_return_val_if_fail (a != NULL && b != NULL, 0); if (a->type != b->type) return theme_type_compare (a->type, b->type); return g_utf8_collate (a->display_name, b->display_name); }
false
false
false
false
false
0
gfs2_rgrp_verify(struct gfs2_rgrpd *rgd) { struct gfs2_sbd *sdp = rgd->rd_sbd; struct gfs2_bitmap *bi = NULL; u32 length = rgd->rd_length; u32 count[4], tmp; int buf, x; memset(count, 0, 4 * sizeof(u32)); /* Count # blocks in each of 4 possible allocation states */ for (buf = 0; buf < length; buf++) { bi = ...
false
false
false
false
false
0
track_get_export_filename(Track *track, GError **error) { gchar *res_utf8, *res_cs = NULL; gchar *template; gboolean special_charset; g_return_val_if_fail (track, NULL); prefs_get_string_value(EXPORT_FILES_TPL, &template); res_utf8 = get_string_from_full_template(track, template, TRUE, error)...
false
false
false
false
false
0
update_user(XMPP_SERVER_REC *server, const char *jid, const char *subscription, const char *name, const char *group_name) { XMPP_ROSTER_GROUP_REC *group; XMPP_ROSTER_USER_REC *user; g_return_if_fail(IS_XMPP_SERVER(server)); g_return_if_fail(jid != NULL); user = rosters_find_user(server->roster, jid, &group, N...
false
false
false
false
false
0
ml_gdome_pi_of_n(value obj) { CAMLparam1(obj); GdomeException exc_; GdomeProcessingInstruction* obj_; obj_ = gdome_cast_pi((GdomeNode*) Node_val(obj)); if (obj_ == 0) throw_cast_exception("ProcessingInstruction"); gdome_pi_ref(obj_, &exc_); if (exc_ != 0) throw_exception(exc_, "ProcessingInstructi...
false
false
false
false
false
0
Curl_do_more(struct connectdata *conn, int *complete) { CURLcode result=CURLE_OK; *complete = 0; if(conn->handler->do_more) result = conn->handler->do_more(conn, complete); if(!result && (*complete == 1)) /* do_complete must be called after the protocol-specific DO function */ do_complete(conn); ...
false
false
false
false
false
0
canvas_properties(t_glist *x) { t_gobj *y; char graphbuf[200]; if (glist_isgraph(x) != 0) sprintf(graphbuf, "pdtk_canvas_dialog %%s %g %g %d %g %g %g %g %d %d %d %d\n", 0., 0., glist_isgraph(x) ,//1, x->gl_x1, x->gl_y1, x->gl_x2, x->gl_y2, ...
false
false
false
false
false
0
check_context(char cmd) { // A context is defined to be "modifying text" // Any modifying command establishes a new context. if (dot < context_start || dot > context_end) { if (strchr(modifying_cmds, cmd) != NULL) { // we are trying to modify text[]- make this the current context mark[27] = mark[26]; // mov...
false
false
false
false
false
0
oc_enc_fdct8x8_c(ogg_int16_t _y[64],const ogg_int16_t _x[64]){ const ogg_int16_t *in; ogg_int16_t *end; ogg_int16_t *out; ogg_int16_t w[64]; int i; /*Add two extra bits of working precision to improve accuracy; any more and we could overflow.*/ for(i=0;i<64;i++)w[i]=...
true
true
false
false
false
1
printdocCodeSlices(const string& code, ostream& docout) { if ( ! code.empty() ) { docout << endl << "\\begin{lstlisting}[numbers=none, frame=none, basicstyle=\\small\\ttfamily, backgroundcolor=\\color{yobg}]" << endl; docout << code << endl; docout << "\\end{lstlisting}" << endl << endl; } }
false
false
false
false
false
0
SetDataArraySelections(vtkXMLDataElement* eDSA, vtkDataArraySelection* sel) { if(!eDSA) { sel->SetArrays(0, 0); return; } int numArrays = eDSA->GetNumberOfNestedElements(); if(!numArrays) { sel->SetArrays(0, 0); return; } for(int i=0;...
false
false
false
false
false
0
ario_shell_similarartists_lastfm_cb (GtkButton *button, ArioShellSimilarartists *shell_similarartists) { ARIO_LOG_FUNCTION_START; GtkTreeModel *treemodel; GtkTreeIter iter; gchar *url; /* Get selected row */ if (gtk_tree_selection_get...
false
false
false
false
false
0
ReadMolecule(OBBase* pOb, OBConversion* pConv) { OBMol* pmol = pOb->CastAndClear<OBMol>(); if (!pmol) return false; // get the input stream istream& ifs = *pConv->GetInStream(); // read the smiles string std::string smiles; std::getline(ifs, smiles); // extract title std::...
false
false
false
false
false
0
compare(ContactListItem *it1, ContactListItem *it2) const { // Contacts ContactListContact* it1_contact = dynamic_cast<ContactListContact*>(it1); ContactListContact* it2_contact = dynamic_cast<ContactListContact*>(it2); if (it1_contact && it2_contact) { if (it1_contact->name() < it2_contact->name()) { return ...
false
false
false
false
false
0
ivtv_api_get_data(struct ivtv_mailbox_data *mbdata, int mb, int argc, u32 data[]) { volatile u32 __iomem *p = mbdata->mbox[mb].data; int i; for (i = 0; i < argc; i++, p++) data[i] = readl(p); }
false
false
false
false
false
0
_dxfinit_convert(double gamma) { static double convert_gamma = 0.0; /* current gamma loaded into table */ union hl f; int c, i; if (gamma==convert_gamma) /* already computed? */ return; f.f = 1.0; /* start at pixel value 1.0 */ i = UNSIGN(f.hl.hi); /* unsigned index */ memset(_dxd_con...
false
false
false
false
false
0
_cb_apps_list_selected(void *data) { E_Config_App_List *apps; const E_Ilist_Item *it; const Eina_List *l; unsigned int enabled = 0, disabled = 0; if (!(apps = data)) return; EINA_LIST_FOREACH(e_widget_ilist_items_get(apps->o_list), l, it) { if ((!it->selected) || (it->header)) continue; ...
false
false
false
false
false
0
xhtml_gensumlineb(FILE *outf, Outchoices *od, int namecode, double x, double x7, logical isaverage) { char **lngstr = od->lngstr; unsigned int bm; char *c; fprintf(outf, "<br /><span class=\"%sgensumtitle\">%s%s</span> ", od->cssprefix, lngstr[namecode], lngstr[colon_]); bm = (od->rawbytes)?0:fi...
false
false
false
false
false
0
parse_timezone(struct time *time, const char *zone) { long tz; tz = ('0' - zone[1]) * 60 * 60 * 10; tz += ('0' - zone[2]) * 60 * 60; tz += ('0' - zone[3]) * 60 * 10; tz += ('0' - zone[4]) * 60; if (zone[0] == '-') tz = -tz; time->tz = tz; time->sec -= tz; }
false
false
false
false
false
0
list_get_first_node(struct linked_list* list) { list->iterator = list->first; if (list->iterator == NULL) return NULL; return list->iterator; }
false
false
false
false
false
0
gedit_window_key_press_event (GtkWidget *widget, GdkEventKey *event) { static gpointer grand_parent_class = NULL; GtkWindow *window = GTK_WINDOW (widget); gboolean handled = FALSE; if (grand_parent_class == NULL) { grand_parent_class = g_type_class_peek_parent (gedit_window_parent_class); } /* ha...
false
false
false
false
false
0
reset(unsigned type) { Bit32u i; BX_FD_THIS s.pending_irq = 0; BX_FD_THIS s.reset_sensei = 0; /* no reset result present */ BX_FD_THIS s.main_status_reg = 0; BX_FD_THIS s.status_reg0 = 0; BX_FD_THIS s.status_reg1 = 0; BX_FD_THIS s.status_reg2 = 0; BX_FD_THIS s.status_reg3 = 0; // software reset (vi...
false
false
false
false
false
0
main(int argc, char **argv) { char *temp, *s; /* Save our program name - for error messages */ temp = argv[0]; s=strrchr(argv[0], '/'); if (s != NULL) temp = s + 1; MyName = safemalloc(strlen(temp)+2); strcpy(MyName,"*"); strcat(MyName, temp); if((argc != 6)&&(argc != 7)) { fprintf(s...
false
true
false
false
true
1
ComputeStoreInterceptor( String* name, JSObject* receiver, StrictModeFlag strict_mode) { Code::Flags flags = Code::ComputeMonomorphicFlags( Code::STORE_IC, INTERCEPTOR, strict_mode); Object* code = receiver->map()->FindInCodeCache(name, flags); if (code->IsUndefined()) { StoreStubCompiler co...
false
false
false
false
false
0
position_rect_manipulators() { if(!m_rect) return; //Note that this only works after the child has been added to the canvas: //Goocanvas::Bounds bounds; //m_child->get_bounds(bounds); double x1 = 0; double y1 = 0; get_xy(x1, y1); double child_x = 0; double child_y = 0; get_xy(child_x, child_...
false
false
false
false
false
0
xsh_prepare( cpl_frameset* frames, cpl_frame * bpmap, cpl_frame* mbias, const char* prefix, xsh_instrument* instr, const int pre_overscan_corr,const bool flag_neg_and_thresh_pix) { xsh_pre* pre = NULL; cpl_frame *current = NULL; cpl_frame* product = NULL; xsh_pre* bias = NULL; cpl_image* bias_data = ...
false
false
false
false
false
0
gen_neon_vset_lanev2di (rtx operand0, rtx operand1, rtx operand2, rtx operand3) { rtx _val = 0; start_sequence (); { rtx operands[4]; operands[0] = operand0; operands[1] = operand1; operands[2] = operand2; operands[3] = operand3; #line 3065 "../../src/gcc/config/arm/neon.md" { unsigned in...
false
false
false
false
false
0
nn_TemporalConvolution_forward(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_Tensor_id); int kW = luaT_getfieldcheckint(L, 1, "kW"); int dW = luaT_getfieldcheckint(L, 1, "dW"); int inputFrameSize = luaT_getfieldcheckint(L, 1, "inputFrameSize"); int outputFrameSize = luaT_getfieldcheckint(L, ...
false
false
false
false
false
0
gridfile_read_buffer( gridfile *gfile, char *buf, gridfs_offset size ) { mongo_cursor *chunks; int first_chunk; int total_chunks; gridfs_offset chunksize; gridfs_offset contentlength; gridfs_offset bytes_left; gridfs_offset realSize = 0; contentlength = gridfile_get_contentlength(gfile); chunksi...
false
false
false
false
false
0
_GD_OldTypeName(DIRFILE* D, gd_type_t data_type) { const char* ptr; dtrace("%p, 0x%x", D, data_type); switch(data_type) { case GD_UINT8: ptr = "c"; break; case GD_UINT16: ptr = "u"; break; case GD_INT16: ptr = "s"; break; case GD_UINT32: ptr = "U"; ...
false
false
false
false
false
0
mbfl_filt_ident_koi8r(int c, mbfl_identify_filter *filter) { if (c >= 0x80 && c < 0xff) filter->flag = 0; else filter->flag = 1; /* not it */ return c; }
false
false
false
false
false
0
fm_modules_load(void) { if (!g_atomic_int_compare_and_exchange(&fm_modules_loaded, 0, 1)) return; fm_run_in_default_main_context(_fm_modules_load, NULL); }
false
false
false
false
false
0
bnxt_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { int rc = 0; struct bnxt *bp = netdev_priv(dev); struct bnxt_link_info *link_info = &bp->link_info; bool set_pause = false; u16 fw_advertising = 0; u32 speed; if (!BNXT_SINGLE_PF(bp)) return -EOPNOTSUPP; if (cmd->autoneg == AUTONEG_ENABLE) ...
false
false
false
false
false
0
ks959_suspend(struct usb_interface *intf, pm_message_t message) { struct ks959_cb *kingsun = usb_get_intfdata(intf); netif_device_detach(kingsun->netdev); if (kingsun->speed_urb != NULL) usb_kill_urb(kingsun->speed_urb); if (kingsun->tx_urb != NULL) usb_kill_urb(kingsun->tx_urb); if (kingsun->rx_urb != NULL) ...
false
false
false
false
false
0
register_access (CObjectInfo *obj, CTree *node) { // only track attributes if the tracker dog is configured to do it. if (!_track_attrs) return false; // is a relevent attribute accessed? if (!obj || !obj->AttributeInfo () || !obj->Scope () || obj->Scope ()->isLocalScope () || obj->isAnonymous () ||...
false
false
false
false
false
0
stepRemovingDirectories() { if (!m_dirCleanupStack.isEmpty()) { KUrl dir = m_dirCleanupStack.pop(); kDebug(1203) << "rmdir" << dir; m_currentJob = KIO::rmdir(dir); m_undoJob->emitDeleting(dir); addDirToUpdate(dir); } else { m_current.m_valid = false; ...
false
false
false
false
false
0
dm_raid0(struct lib_context *lc, char **table, struct raid_set *rs) { unsigned int stripes = 0; uint64_t min, last_min = 0; for (; (min = _smallest(lc, rs, last_min)); last_min = min) { if (last_min && !p_fmt(lc, table, "\n")) goto err; if (!_dm_raid0_bol(lc, table, round_down(min, rs->stride), last_...
false
false
false
false
false
0
set_palette ( unsigned char *rgbs, // 256 3-byte entries. int maxval, // Highest val. for each color. int brightness // Brightness control (100 = normal). ) { // Get the colors. for (int i = 0; i < 3*256; i += 3) { unsigned char r = Get_color16(rgbs[i], maxval, brightness); unsigned char g = Get_...
false
false
false
false
false
0
initShellProcess() { if (tty0_fd != -1) close(tty0_fd); FbTerm::instance()->initChildProcess(); if (!firstShell) return; bool verbose = false; Config::instance()->getOption("verbose", verbose); TtyInput::instance()->showInfo(verbose); Screen::instance()->showInfo(verbose); Font::instance()->showInfo(verbose)...
false
false
false
false
false
0
pll_freq_delta(unsigned int f1, unsigned int f2) { if (f2 < f1) { f2 = f1 - f2; } else { f2 = f2 - f1; } return f2; }
false
false
false
false
false
0