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
hawki_vector_get_mode(cpl_vector * vec) { int nb ; int nbins ; double min, max ; double bin_size ; cpl_bivector * hist ; cpl_vector * hist_x ; cpl_vector * hist_y ; double cur_val ; int ...
false
false
false
false
false
0
gst_auto_video_convert_add_autoconvert (GstAutoVideoConvert * autovideoconvert) { GstPad *pad; if (autovideoconvert->autoconvert) return TRUE; autovideoconvert->autoconvert = gst_element_factory_make ("autoconvert", "autoconvertchild"); if (!autovideoconvert->autoconvert) { GST_ERROR_OBJECT (aut...
false
false
false
false
false
0
alpasscv_nn_fetch(register alpasscv_susp_type susp, snd_list_type snd_list) { int cnt = 0; /* how many samples computed */ int togo; int n; sample_block_type out; register sample_block_values_type out_ptr; register sample_block_values_type out_ptr_reg; register sample_type * delayptr_reg; ...
false
false
false
false
false
0
nvkm_disp_class_new(struct nvkm_device *device, const struct nvkm_oclass *oclass, void *data, u32 size, struct nvkm_object **pobject) { const struct nvkm_disp_oclass *sclass = oclass->engn; struct nvkm_disp *disp = nvkm_disp(oclass->engine); struct nvkm_oproxy *oproxy; int ret; ret = nvkm_oproxy_new_(...
false
false
false
false
false
0
regfind_count(const char* from, const char* exp, int offset) { regmatch_t pm; int n = 0; pm.begin = 0; pm.end = 0; pm = regfind(from,exp); while(pm.begin != -1) { n++; //printf("trovato a partire da %d e fino a %d, riparto da %ld\n", // pm.begin,pm.end,pm.end - offset); from += pm.end - offset; pm = regfind(fro...
false
false
false
false
false
0
buildregular() { if (mcount != 0x0) { buildea(&target); postb |= regbits[source.base]; } }
false
false
false
false
false
0
ast_unregister_application(const char *app) { struct ast_app *tmp; AST_RWLIST_WRLOCK(&apps); AST_RWLIST_TRAVERSE_SAFE_BEGIN(&apps, tmp, list) { if (!strcasecmp(app, tmp->name)) { unreference_cached_app(tmp); AST_RWLIST_REMOVE_CURRENT(list); ast_verb(2, "Unregistered application '%s'\n", tmp->name); as...
true
true
false
false
false
1
l_getpmentry(hfsvol *vol, Partition *map, unsigned long bnum) { block b; const byte *ptr = b; int i; if (b_readpb(vol, bnum, &b, 1) == -1) goto fail; d_fetchsw(&ptr, &map->pmSig); d_fetchsw(&ptr, &map->pmSigPad); d_fetchsl(&ptr, &map->pmMapBlkCnt); d_fetchsl(&ptr, &map->pmPyPartStart); d_fetchsl...
false
true
false
false
false
1
mca_btl_openib_proc_remove(ompi_proc_t *proc, mca_btl_base_endpoint_t *endpoint) { size_t i; mca_btl_openib_proc_t* ib_proc = NULL; /* Remove endpoint from the openib BTL version of the proc as well */ ib_proc = mca_btl_openib_proc_lookup_ompi(proc); if (NULL !...
false
false
false
false
false
0
set_cpu_itimer(struct task_struct *tsk, unsigned int clock_id, const struct itimerval *const value, struct itimerval *const ovalue) { cputime_t cval, nval, cinterval, ninterval; s64 ns_ninterval, ns_nval; u32 error, incr_error; struct cpu_itimer *it = &tsk->signal->it[clock_id]; nval = timeval_to_cput...
false
false
false
false
false
0
ceci_log_v(enum libcec_log_level level, const char *function, const char *format, va_list args) { const char *prefix; struct timeval tv; struct tm *loc; #ifndef ENABLE_DEBUG_LOGGING if (level < ceci_global_log_level) return; #endif switch (level) { case LIBCEC_LOG_LEVEL_DEBUG: prefix = "debug"; break;...
false
false
false
false
false
0
GC_register_altstack (void *stack, int stack_size, void *altstack, int altstack_size) { GC_thread thread; LOCK(); thread = (void *)GC_lookup_thread(pthread_self()); if (thread) { thread->stack = stack; thread->stack_size = stack_size; thread->altstack = altstack; thread->altstack_size = altstack_size; } e...
false
false
false
false
false
0
really_spawn (void *d) { spawn_data *data = (spawn_data *)d; scm_t_catch_body body = data->body; void *body_data = data->body_data; scm_t_catch_handler handler = data->handler; void *handler_data = data->handler_data; scm_i_thread *t = SCM_I_CURRENT_THREAD; scm_i_scm_pthread_mutex_lock (&data->mutex); ...
false
false
false
false
false
0
regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *preg; char *errbuf; size_t errbuf_size; { const char *msg; size_t msg_size; if (errcode < 0 || errcode >= (sizeof (re_error_msgid) / sizeof (re_error_msgid[0]))) /* Only error codes returned by the rest of the cod...
false
false
false
false
false
0
s_border_properties_cell (const char * border_color, const char * border_style, const char * border_width, const char * color, PP_PropertyMap::Line & line, const PP_PropertyMap::Line lineTable ) { /* cell-border properties: * * (1) color - ...
false
false
false
false
false
0
jbg_set_default_l0(struct jbg_enc_state *s) { s->l0 = jbg_ceil_half(s->yd, s->d) / 35; /* 35 stripes/image */ while ((s->l0 << s->d) > 128) /* but <= 128 lines/stripe */ --s->l0; if (s->l0 < 2) s->l0 = 2; }
false
false
false
false
false
0
get_related(vector<int> &out, int pivot_sid, int limit) { string query = "SELECT pos FROM Filter NATURAL INNER JOIN Library " "WHERE sid IN (" "SELECT L.sid FROM C.Correlations AS C INNER JOIN Last AS L " "ON CASE WHEN C.x = ? THEN C.y ELSE C.x END = L.sid " ...
false
false
false
false
false
0
gda_dsn_split (const gchar *string, gchar **out_dsn, gchar **out_username, gchar **out_password) { const gchar *ptr; g_return_if_fail (string); g_return_if_fail (out_dsn); g_return_if_fail (out_username); g_return_if_fail (out_password); *out_dsn = NULL; *out_username = NULL; *out_password = NULL; for (ptr = ...
false
false
false
false
false
0
GetBonds(bool exterior) const { OBAtom *atom; vector<OBBond*> bonds; OBBitVec idxs; unsigned int sz; sz = (unsigned int) _atoms.size(); for ( unsigned int i = 0 ; i < sz ; ++i ) { atom = _atoms[i]; OBBond *bond; vector<OBBond*>::iterator b; ...
false
false
false
false
false
0
clear_buff(void) { int count; /*** called when spadbuf gives me a line incase there is something already on the line ****/ if (buff_pntr > 0) { /*** backup to the beginning of the line ***/ for (count = curr_pntr; count > 0; count--) myputchar(_BKSPC); /** blank ov...
false
false
false
false
false
0
var_parse_file_compile( VAR_PARSE_FILE const * parse, compiler * c ) { int i; for ( i = 0; i < parse->filename->size; ++i ) var_parse_group_compile( dynamic_array_at( VAR_PARSE_GROUP *, parse->filename, parse->filename->size - i - 1 ), c ); compile_emit( c, INSTR_APPEND_STRINGS, parse->f...
false
false
false
false
false
0
write_typed_alloc_defns (const type_p structures, const pair_p typedefs) { type_p s; pair_p p; oprintf (header_file, "\n/* Allocators for known structs and unions. */\n\n"); for (s = structures; s; s = s->next) { if (!USED_BY_TYPED_GC_P (s)) continue; write_typed_struct_alloc_def (s, "", ...
false
false
false
false
false
0
readTrueHeading(double* pdfTrueHeading, int iToken, const char* pszTokenDesc) { int bRet = readDoubleWithBounds(pdfTrueHeading, iToken, pszTokenDesc, -180., 360.); if (bRet) { if (*pdfTrueHeading < 0.) *pdfTrueHeading += 180.; } return bRet; }
false
false
false
false
false
0
set(const char *module, const char *entry, int value) { int ret; DB_LIST list; if(!module || !entry) return false; list = eXdbmGetList(dbid, 0, (char *)module); if (list == 0) { ret = eXdbmCreateList(dbid, 0, (char *)module, 0); if (ret == -1) { puts(eXdbmGetErrorString(eXdbmGetLastE...
false
false
false
false
false
0
ls_unlock_v6(struct dlm_ls_info *lsinfo, uint32_t lkid, uint32_t flags, struct dlm_lksb *lksb, void *astarg) { struct dlm_write_request req; set_version_v6(&req); req.cmd = DLM_USER_UNLOCK; req.i.lock.lkid = lkid; req.i.lock.flags = (flags & ~LKF_WAIT); req.i.lock.lksb = lksb; req.i.lock.namelen = 0; req.i...
false
false
false
false
false
0
build_tool_dialog_init_text_entries (BuildToolDialog* self) { GtkEntry* _tmp0_ = NULL; GtkEntry* _tmp1_ = NULL; GtkEntry* _tmp2_ = NULL; GtkEntry* _tmp3_ = NULL; g_return_if_fail (self != NULL); _tmp0_ = (GtkEntry*) gtk_entry_new (); g_object_ref_sink (_tmp0_); _g_object_unref0 (self->priv->_entry_label); self...
false
false
false
false
false
0
getNextVectorRegister(unsigned Reg, unsigned Stride = 1) { while (Stride--) { switch (Reg) { default: llvm_unreachable("Vector register expected!"); case AArch64::Q0: Reg = AArch64::Q1; break; case AArch64::Q1: Reg = AArch64::Q2; break; case AArch64::Q2: Reg = AArch64::Q3; break; c...
false
false
false
false
false
0
x509_fabricate_name(struct x509_parse_context *ctx, size_t hdrlen, unsigned char tag, char **_name, size_t vlen) { const void *name, *data = (const void *)ctx->data; size_t namesize; char *buffer; if (*_name) return -EINVAL; /* Empty name string if no material */ if (!ctx->cn_size && !ctx-...
false
false
false
false
false
0
insertPlaylist( int topModelRow, Playlists::PlaylistPtr playlist ) { insertPlaylists( topModelRow, Playlists::PlaylistList() << playlist ); }
false
false
false
false
false
0
tg_prfill_conf_uint(struct seq_file *sf, struct blkg_policy_data *pd, int off) { struct throtl_grp *tg = pd_to_tg(pd); unsigned int v = *(unsigned int *)((void *)tg + off); if (v == -1) return 0; return __blkg_prfill_u64(sf, pd, v); }
false
false
false
false
false
0
help_popup(){ int i, j, k; int cmds; int len; char *htxt; char *cmd; static GtkWidget *dialog = NULL; cmds = 0; for(i=0; i<NumFunctionRows; i++){ cmds += rowinf[i].numBtns; } if(NULL == (htxt = (char*)malloc((3000+cmds*60)*sizeof(char)))){ perror("help_popup: malloc"); ...
false
true
false
false
false
1
direct_print_memcpy_routines( void ) { int i; u32 config_flags = 0; direct_log_printf( NULL, "\nPossible values for memcpy option are:\n\n" ); for (i=1; memcpy_method[i].name; i++) { bool unsupported = (memcpy_method[i].cpu_require & ~config_flags); direct_log_printf( NULL, " ...
false
false
false
false
false
0
set_nat_binding_delay (unsigned delay) { PTRACE (3, "Ekiga\tNat binding delay set to " << delay); if (delay > 0) SetNATBindingTimeout (PTimeInterval (0, delay)); }
false
false
false
false
false
0
send_unknown(struct gspca_dev *gspca_dev, int sensor) { reg_w(gspca_dev, 0x01, 0x0000); /* bridge reset */ switch (sensor) { case SENSOR_PAS106: reg_w(gspca_dev, 0x03, 0x003a); reg_w(gspca_dev, 0x0c, 0x003b); reg_w(gspca_dev, 0x08, 0x0038); break; case SENSOR_ADCM2700: case SENSOR_GC0305: case SENSOR_OV7...
false
false
false
false
false
0
diff_filespec_is_binary(struct diff_filespec *one) { if (one->is_binary == -1) { diff_filespec_load_driver(one); if (one->driver->binary != -1) one->is_binary = one->driver->binary; else { if (!one->data && DIFF_FILE_VALID(one)) diff_populate_filespec(one, 0); if (one->data) one->is_binary = buf...
false
false
false
false
false
0
summary_update_unread(SummaryView *summaryview, FolderItem *removed_item) { guint new, unread, unreadmarked, marked, total; guint replied, forwarded, locked, ignored, watched; static gboolean tips_initialized = FALSE; #if !(GTK_CHECK_VERSION(2,12,0)) GtkTooltips *tips = summaryview->tooltips; #endif if (prefs_com...
false
false
false
false
false
0
conn_closecon(struct conn_sslcon *con) { if(con->state == CONNECTION_STATE_TCPCONNECTING || con->state == CONNECTION_STATE_SSLCONNECTING) { close(con->fd); con->state = CONNECTION_STATE_CLOSED; return 0; } if(con->state == CONNECTION_STATE_SSLCLOSING || con->state == CONNECTION_STATE_CLOSED) return 0; if(con-...
false
false
false
false
false
0
delete_algo_list(GF_List *algos) { u32 i; for (i=0;i<gf_list_count(algos); i++) { GF_IPMPX_Authentication *ip_auth = (GF_IPMPX_Authentication *)gf_list_get(algos, i); GF_IPMPX_AUTH_Delete(ip_auth); } gf_list_del(algos); }
false
false
false
false
false
0
on_tvw_results_button_press_event (GtkWidget *w, GdkEventButton *event, GbemolLibrary* lib) { gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (lib->priv->fil_results)); if (event->type == GDK_BUTTON_PRESS) if (event->button == 3) { gtk_menu_popup (GTK_MENU(gtk_ui_manager_get_widget (lib->priv->manager, ...
false
false
false
false
false
0
list_insert_at(list_t *restrict l, const void *data, unsigned int pos) { struct list_entry_s *lent, *succ, *prec; if (l->iter_active || pos > l->numels) return -1; /* this code optimizes malloc() with a free-list */ if (l->spareelsnum > 0) { lent = l->spareels[l->spareelsnum-1]; l->spa...
false
false
false
false
false
0
netsys_fallocate(value fd, value start, value len) { #ifdef HAVE_POSIX_FALLOCATE int r; int64 start_int, len_int; off_t start_off, len_off; /* Att: off_t might be 64 bit even on 32 bit systems! */ start_int = Int64_val(start); len_int = Int64_val(len); if ( ((int64) ((off_t) start_int)) !=...
false
false
false
false
false
0
fsl_asrc_runtime_resume(struct device *dev) { struct fsl_asrc *asrc_priv = dev_get_drvdata(dev); int i, ret; ret = clk_prepare_enable(asrc_priv->mem_clk); if (ret) return ret; ret = clk_prepare_enable(asrc_priv->ipg_clk); if (ret) goto disable_mem_clk; for (i = 0; i < ASRC_CLK_MAX_NUM; i++) { ret = clk_pr...
false
false
false
false
false
0
preferredPos(Corona *corona) const { Q_ASSERT(corona); if (isPanelContainment()) { //kDebug() << "is a panel, so put it at" << preferredPanelPos(corona); return preferredPanelPos(corona); } QPointF pos(0, 0); QTransform t; while (QGraphicsItem *i = corona->itemAt(pos, t)) { ...
false
false
false
false
false
0
nfs4_destroy_session(struct nfs4_session *session) { struct rpc_xprt *xprt; struct rpc_cred *cred; cred = nfs4_get_clid_cred(session->clp); nfs4_proc_destroy_session(session, cred); if (cred) put_rpccred(cred); rcu_read_lock(); xprt = rcu_dereference(session->clp->cl_rpcclient->cl_xprt); rcu_read_unlock(); ...
false
false
false
false
false
0
clipToStrokePath() { double xMin, yMin, xMax, yMax, x, y, t0, t1; GfxSubpath *subpath; int i, j; xMin = xMax = yMin = yMax = 0; // make gcc happy for (i = 0; i < path->getNumSubpaths(); ++i) { subpath = path->getSubpath(i); for (j = 0; j < subpath->getNumPoints(); ++j) { transform(subpath->getX...
false
false
false
false
false
0
bfa_ioc_fwver_md5_check(struct bfi_ioc_image_hdr_s *fwhdr_1, struct bfi_ioc_image_hdr_s *fwhdr_2) { int i; for (i = 0; i < BFI_IOC_MD5SUM_SZ; i++) if (fwhdr_1->md5sum[i] != fwhdr_2->md5sum[i]) return BFA_FALSE; return BFA_TRUE; }
false
false
false
false
false
0
bindGL(const bool useShadow) const { if (m_isReady) m_program.bind(); #if !defined(NDEBUG) else { fprintf(stderr, "Attempt to bind non-ready shader\n"); } #endif }
false
false
false
false
false
0
clear_diff_rs(list old_vs_group, virtual_server_t * old_vs) { element e; list l = old_vs->rs; list new = get_rs_list(old_vs); real_server_t *rs; /* If old vs didn't own rs then nothing return */ if (LIST_ISEMPTY(l)) return 1; /* remove RS from old vs which are not found in new vs */ list rs_to_remove = allo...
false
false
false
false
false
0
knowledge_god_add(struct knowledge_player *current, const char *item, const struct knowledge_type *type, player *pl) { char *dup = strdup_local(item), *pos = strchr(dup, ':'); StringBuffer *buf; int what, i; knowledge_item* check; if (!pos) { LOG(llevError, "knowledge_god_add: invalid god i...
false
false
false
false
true
1
pages_map(void *addr, size_t size, bool noreserve) { void *ret; /* * We don't use MAP_FIXED here, because it can cause the *replacement* * of existing mappings, and we only want to create new mappings. */ int flags = MAP_PRIVATE | MAP_ANON; #ifdef MAP_NORESERVE if (noreserve) flags |= MAP_NORESERVE; #endif...
false
false
false
false
false
0
add_user_account(char *user, int dynamic) { if(user && !turn_params.users_params.use_auth_secret_with_timestamp) { char *s = strstr(user, ":"); if(!s || (s==user) || (strlen(s)<2)) { TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR, "Wrong user account: %s\n",user); } else { size_t ulen = s-user; char *usname = (char...
false
true
false
false
false
1
gee_tree_set_sub_set_real_sub_set (GeeAbstractSortedSet* base, gconstpointer after, gconstpointer before) { GeeTreeSetSubSet * self; GeeSortedSet* result = NULL; GeeTreeSet* _tmp0_ = NULL; GeeTreeSetRange* _tmp1_ = NULL; gconstpointer _tmp2_ = NULL; gconstpointer _tmp3_ = NULL; GeeTreeSetRange* _tmp4_ = NULL; G...
false
false
false
false
false
0
H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space, hid_t dxpl_id, const void *buf) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Direct chunk write */ if(direct_write) { ...
false
false
false
false
false
0
SeqSetEntropy(ss_type P) { long i; double *freq,H; freq = tFreqSeqSet(P); for(H=0.0,i = 1; i <= nAlpha(P->A); i++){ if(freq[i] > 0.0) H += freq[i] * log(freq[i]); } return (-1.442695041*H); }
false
false
false
false
false
0
prop_gen_cons(list *l) { list *nl = malloc(sizeof(list)); if (nl == NULL) { return THEFT_TRIAL_ERROR; } nl->v = 0; nl->next = l; theft_trial_res res; if (list_length(nl) == list_length(l) + 1) { res = THEFT_TRIAL_PASS; } else { res = THEFT_TRIAL_FAIL; } free(nl); ...
false
false
false
false
false
0
background(void) { RETSIGTYPE (*x)(int); /* * C shell * puts its children in a different process group. * The process group the terminal in is the forground. * * Only available on systems with job control. */ #ifdef SIGSTOP if (getpgrp(CONF_getpgrp_arg) != tcget...
false
false
false
false
false
0
get_entry_by_match_function(private_ike_sa_manager_t *this, ike_sa_id_t *ike_sa_id, entry_t **entry, u_int *segment, linked_list_match_t match, void *param) { table_item_t *item; u_int row, seg; row = ike_sa_id_hash(ike_sa_id) & this->table_mask; seg = row & this->segment_mask; lock_single_segment(this...
false
false
false
false
false
0
qof_query_core_predicate_free (QofQueryPredData *pdata) { QueryPredDataFree free_fcn; g_return_if_fail (pdata); g_return_if_fail (pdata->type_name); free_fcn = qof_query_predicate_free (pdata->type_name); free_fcn (pdata); }
false
false
false
false
false
0
interv(double *xt, int *lxt, double *x, int *left, int *mflag) { static int ilo = 1; static int istep, middle, ihi; // Parameter adjustments --xt; // from * a practical guide to splines * by C. de Boor // computes left = max( i : xt(i) .lt. xt(lxt) .and. xt(i) .le. x ) // // ****** i n p u t ****** ...
false
false
false
false
false
0
parsebranch(struct vars * v, int stopper, /* EOS or ')' */ int type, /* LACON (lookahead subRE) or PLAIN */ struct state * left, /* leftmost state */ struct state * right, /* rightmost state */ int partial) /* is this only part of a branch? */ { struct state *lp; /* left end of current construct ...
false
false
false
false
false
0
amitk_volumes_get_max_size(GList * objects) { amide_real_t temp, max_size; if (objects == NULL) return -1.0; /* invalid */ /* first process the rest of the list */ max_size = amitk_volumes_get_max_size(objects->next); /* now process and compare to the children */ temp = amitk_volumes_get_max_size(AMITK_...
false
false
false
false
false
0
_relative_date_fmt(const struct tm *when) { static int todays_date; int distance = 1000 * (when->tm_year + 1900) + when->tm_yday; if (!todays_date) { time_t now = time(NULL); struct tm tm; localtime_r(&now, &tm); todays_date = 1000 * (tm.tm_year + 1900) + tm.tm_yday; } distance -= todays_date; if (dist...
false
false
false
false
false
0
book_backend_get_contact_list_uids_sync (EBookBackend *backend, const gchar *query, GQueue *out_uids, GCancellable *cancellable, GError **error) { EBookBac...
false
false
false
false
false
0
engine_take_move (char *line) { byte *move = move_read (line); movstack_trunc (); movstack_push (cur_pos.board, move); if (game_stateful) { void *newstate = game_newstate (&cur_pos, move); statestack_push (newstate); cur_pos.state = statestack_peek (); } move_apply (cur_pos.board, move); cur_pos.num_moves...
false
false
false
false
false
0
ro_step(struct ro_spine *s, dm_block_t new_child) { int r; if (s->count == 2) { unlock_block(s->info, s->nodes[0]); s->nodes[0] = s->nodes[1]; s->count--; } r = bn_read_lock(s->info, new_child, s->nodes + s->count); if (!r) s->count++; return r; }
false
false
false
false
false
0
DeregisterForEvents(int handle, unsigned long reserved) { struct spnode *node = get_spnode_from_handle(handle); if (node == NULL || !node->opened) return RC_INVALID_HANDLE; io_cancel(node->event_fd); return RC_SUCCESS; }
false
false
false
false
false
0
IDirectFBImageProvider_DFIFF_GetSurfaceDescription( IDirectFBImageProvider *thiz, DFBSurfaceDescription *dsc ) { const DFIFFHeader *header; DIRECT_INTERFACE_GET_DATA (IDirectFBImageProvider_DFIFF) header = data->ptr; dsc->flags = DSDESC_WI...
false
false
false
false
false
0
namespace_save (CamelStoreSummary *s, FILE *out, CamelIMAPXNamespaceList *nsl) { CamelIMAPXStoreNamespace *ns, *cur = NULL; guint32 i, n; for (i = 0; i < 3; i++) { switch (i) { case 0: cur = nsl->personal; break; case 1: cur = nsl->shared; break; case 2: cur = ...
false
false
false
false
false
0
Update() { // I don't like to override Update, or call Modified() in Update, // but this allows updates to be forced where MTimes can't be used bool resampleToScreenPixels = (this->ResampleToScreenPixels != 0); vtkRenderer *ren = 0; if (this->AutoAdjustImageQuality && resampleToScreenPixels) { // onl...
false
false
false
false
false
0
eval_ip_dst_addr2cnet(struct ftxlate_action *ftxa, char *rec, struct fts3rec_offsets *fo) { struct fts3rec_all2 cur; FT_RECGET_DSTADDR(cur,rec,*fo); if ((cur.dstaddr & 0x80000000) == 0) *((u_int32*)(rec+(*fo).dstaddr)) &= 0xFF000000; else if ((cur.dstaddr & 0xC0000000) == 0x80000000) *((u_int32*)(rec...
false
false
false
false
false
0
Add(const Barry::DatabaseDatabase &dbdb) { DatabaseDatabase::DatabaseArrayType::const_iterator b = dbdb.Databases.begin(), e = dbdb.Databases.end(); for( ; b != e; ++b ) { // hmmm, could optimize this and only add ids // with RecordCount > 0, but let's stick with this // for now... it might flush bugs out ...
false
false
false
false
false
0
hv_kvp_onchannelcallback(void *context) { struct vmbus_channel *channel = context; u32 recvlen; u64 requestid; struct hv_kvp_msg *kvp_msg; struct icmsg_hdr *icmsghdrp; struct icmsg_negotiate *negop = NULL; int util_fw_version; int kvp_srv_version; static enum {NEGO_NOT_STARTED, NEGO_IN_PROGRESS, ...
false
false
false
false
false
0
ifEqualDomainMG(DomainMG*g, DomainMG* right) { if(g->xSize != right->xSize) return FALSE; if(g->ySize != right->ySize) return FALSE; if(g->zSize != right->zSize) return FALSE; if(g->x0 != right->x0) return FALSE; if(g->y0 != right->y0) return FALSE; if(g->z0 != right->z0) return FALSE; if(g->xLength != right->...
false
false
false
false
false
0
buildScratchLoadStore(MachineBasicBlock::iterator MI, unsigned LoadStoreOp, unsigned Value, unsigned ScratchRsrcReg, unsigned ScratchOffset, ...
false
false
false
false
false
0
calculateRhoMatrix(int id,const RhoDMatrix & rhoin, const vector<RhoDMatrix> & rhoout) const { // vectors for the helicities vector<int> ihel1(_outspin.size()+1),ihel2(_outspin.size()+1); // rhomatrix to be returned RhoDMatrix output(_outspin[id], false); // loop over all helicity components of the matri...
false
false
false
false
false
0
brcmf_pcie_setup(struct device *dev, const struct firmware *fw, void *nvram, u32 nvram_len) { struct brcmf_bus *bus = dev_get_drvdata(dev); struct brcmf_pciedev *pcie_bus_dev = bus->bus_priv.pcie; struct brcmf_pciedev_info *devinfo = pcie_bus_dev->devinfo; struct brcmf_commonring **flowrings; int ret; u32...
false
false
false
false
false
0
RegisterTupleQueueOnFunnel(TupleQueueFunnel *funnel, shm_mq_handle *handle) { if (funnel->nqueues < funnel->maxqueues) { funnel->queue[funnel->nqueues++] = handle; return; } if (funnel->nqueues >= funnel->maxqueues) { int newsize = funnel->nqueues * 2; Assert(funnel->nqueues == funnel->maxqueues); f...
false
false
false
false
false
0
iface_get_param_count(struct iface_rec *iface, int iface_all) { int num_found = 0, rc; struct iface_param_count iface_params; log_debug(8, "In iface_get_param_count\n"); iface_params.primary = iface; iface_params.count = 0; if (iface_all) rc = iface_for_each_iface(&iface_params, 0, &num_found, __iface...
false
false
false
false
false
0
acpi_fix_checksum ( struct acpi_description_header *acpi ) { unsigned int i = 0; uint8_t sum = 0; for ( i = 0 ; i < acpi->length ; i++ ) { sum += *( ( ( uint8_t * ) acpi ) + i ); } acpi->checksum -= sum; }
false
false
false
false
false
0
write(hsStream* S, plResManager* mgr) { pfGUIControlMod::write(S, mgr); S->writeInt(fControls.getSize()); for (size_t i=0; i<fControls.getSize(); i++) mgr->writeKey(S, fControls[i]); S->writeShort(fDefaultValue); }
false
false
false
false
false
0
update_softlimit(gfarm_time_t *exceedp, gfarm_time_t now, gfarm_time_t grace, gfarm_int64_t val, gfarm_int64_t soft) { if (!quota_limit_is_valid(grace) /* disable all softlimit */ || !quota_limit_is_valid(soft) /* disable this softlimit */ || val <= soft /* not exceed */ ) { *exceedp = GFARM_QUOTA_INVA...
false
false
false
false
false
0
calc_scan_param (pixma_sane_t * ss, pixma_scan_param_t * sp) { int x1, y1, x2, y2; int error; memset (sp, 0, sizeof (*sp)); sp->channels = (OVAL (opt_mode).w == 0) ? 3 : 1; sp->depth = (OVAL (opt_mode).w == 2) ? 1 : 8; sp->xdpi = sp->ydpi = OVAL (opt_resolution).w; #define PIXEL(x,dpi) (int)((SANE_UNFIX(...
false
false
false
false
false
0
xps_read_dir_part(xps_document *doc, char *name) { char buf[2048]; xps_part *part; FILE *file; int count, size, offset, i, n; int seen_last = 0; fz_strlcpy(buf, doc->directory, sizeof buf); fz_strlcat(buf, name, sizeof buf); /* All in one piece */ file = fopen(buf, "rb"); if (file) { fseek(file, 0, SEEK_...
false
false
false
false
true
1
gf_isom_get_media_timescale(GF_ISOFile *the_file, u32 trackNumber) { GF_TrackBox *trak; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return 0; return trak->Media->mediaHeader->timeScale; }
false
false
false
false
false
0
operator[](int i) const { REPORT if (i < 0 || i >= n) Throw(Logic_error("array index out of range")); return a[i]; }
false
false
false
false
false
0
charData(void *userData, const char *s, int len) { ParserState *ps = reinterpret_cast<ParserState *>(userData); if (len) { std::string str(s,len); ps->LastData[ps->Depth] += str; } }
false
false
false
false
false
0
JS_XDRMemGetData(JSXDRState *xdr, uint32 *lp) { if (xdr->ops != &xdrmem_ops) return NULL; *lp = MEM_COUNT(xdr); return MEM_BASE(xdr); }
false
false
false
false
false
0
forward_ldap_entry(struct pine *ps, LDAP_CHOOSE_S *winning_e) { STORE_S *srcstore = NULL; SourceType srctype = CharStar; dprint((9, "- forward_ldap_entry -\n")); if((srcstore = prep_ldap_for_viewing(ps,winning_e,srctype,NULL)) != NULL){ forward_text(ps, so_text(srcstore), srctype); ps->mangled_s...
false
false
false
false
false
0
pdf_to_png(char *pdf) { char *png, *out; if (pdf == NULL) return NULL; if (strstr(pdf, ".pdf") != NULL) png = strdup_new_extension(pdf, ".pdf", ".png"); else if (strstr(pdf, ".PDF") != NULL) png = strdup_new_extension(pdf, ".PDF", ".png"); else return NULL; ...
false
false
false
false
false
0
FDKsbrEnc_InitPSEncode( HANDLE_PS_ENCODE hPsEncode, const PS_BANDS psEncMode, const FIXP_DBL iidQuantErrorThreshold ) { FDK_PSENC_ERROR error = PSENC_OK; if (NULL==hPsEncode) { error = PSENC_INVALID_HANDLE; } else { if (PSENC_OK != (InitPSD...
false
false
false
false
false
0
compute_quant_weights(spx_lsp_t *qlsp, spx_word16_t *quant_weight, int order) { int i; spx_word16_t tmp1, tmp2; for (i=0;i<order;i++) { if (i==0) tmp1 = qlsp[i]; else tmp1 = qlsp[i]-qlsp[i-1]; if (i==order-1) tmp2 = LSP_PI-qlsp[i]; else tmp2 = qlsp...
false
false
false
false
false
0
bonding_init(void) { int i; int res; pr_info("%s", bond_version); res = bond_check_params(&bonding_defaults); if (res) goto out; res = register_pernet_subsys(&bond_net_ops); if (res) goto out; res = bond_netlink_init(); if (res) goto err_link; bond_create_debugfs(); for (i = 0; i < max_bonds; i++...
false
false
false
false
false
0
cleanreturn(int retval, PyObject *freelist) { if (freelist && retval != 0) { /* We were successful, reset the destructors so that they don't get called. */ Py_ssize_t len = PyList_GET_SIZE(freelist), i; for (i = 0; i < len; i++) PyCapsule_SetDestructor(PyList_GET_ITEM(...
false
false
false
false
false
0
gen_split_2385 (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands) { rtx operand0; rtx operand1; rtx operand2; rtx _val = 0; start_sequence (); #line 1020 "../../src/gcc/config/arm/neon.md" { if (!REG_P (operands[2])) operands[2] = operands[0]; } operand0 = operands[0]; (void) operand0; operand1...
false
false
false
false
false
0
mwifiex_usb_host_to_card(struct mwifiex_adapter *adapter, u8 ep, struct sk_buff *skb, struct mwifiex_tx_param *tx_param) { struct usb_card_rec *card = adapter->card; struct urb_context *context = NULL; struct usb_tx_data_port *port = NULL; u8 *data = (u8 *)skb->data; struct urb *tx_urb; int idx, r...
false
false
false
true
false
1
UnpicklePrologue(void) { m_startTable.resize(kPickleNumStates); m_endTable.resize(kPickleNumStates); m_startTable[kPickleData]["judgement"] = &GameRewards::NullHandler; m_endTable[kPickleData]["judgement"] = &GameRewards::HandleJudgementEnd; m_startTable[kPickleData]["timed"] = &GameRewards::NullHan...
false
false
false
false
false
0
http_get( HTTP_OBJ* this ) { FILE* fp; char buf[HTML_CHUNK_SIZE]; int bytes_read, bytes_written; int error = 0; int handler_id; struct stat file_stat; int chk_cnt = 0; printf("received GET command: %s\n", this->rcvbuf ); ...
false
false
false
false
true
1
convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo, guchar **lines) { gint i, j; g_return_if_fail (cinfo != NULL); g_return_if_fail (cinfo->output_components == 4); g_return_if_fail (cinfo->out_color_space == JCS_CMYK); for (i = cinfo->rec_outbuf_height - 1; i >= 0; i--) { guchar *p; p = li...
false
false
false
false
false
0
listRec(fcb* file){ fcb* temp; /*If it is a directory*/ if(file->bits & FCB_DIR_BITMASK){ printf("Directory %s, %d files:\n", file->filename, file->dirHead->size); temp = file->dirHead->head; while(temp != NULL){ listRec(temp); temp = temp->next; } ...
false
false
false
false
false
0
delEvent( const QList<GenericPlayer *> & list, GenericEvent * event ) { AttalPlayerSocket * socket; uint nbSockets = (uint) list.count(); for( uint k = 0; k < nbSockets; ++k ) { socket = findSocket(list.at(k)); if( socket->canSee( event->getCell() ) ) { socket->sendDelEvent( event ); } } }
false
false
false
false
false
0