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
tea5764_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct tea5764_device *radio; struct v4l2_device *v4l2_dev; struct v4l2_ctrl_handler *hdl; struct tea5764_regs *r; int ret; PDEBUG("probe"); radio = kzalloc(sizeof(struct tea5764_device), GFP_KERNEL); if (!radio) return -E...
false
false
false
false
false
0
vtkParse_FreeTemplateDecomposition( const char *name, int n, const char **args) { int i; if (name) { free((char *)name); } if (n > 0) { for (i = 0; i < n; i++) { free((char *)args[i]); } free((char **)args); } }
true
true
false
false
false
1
create_node(const char *id, const char *uname, const char *type, const char *score, pe_working_set_t * data_set) { node_t *new_node = NULL; if (pe_find_node(data_set->nodes, uname) != NULL) { crm_config_warn("Detected multiple node entries with uname=%s" " - this is rarely inten...
false
false
false
false
false
0
cfq_rb_erase(struct rb_node *n, struct cfq_rb_root *root) { if (root->left == n) root->left = NULL; rb_erase_init(n, &root->rb); --root->count; }
false
false
false
false
false
0
sum_volume (FttCell * cell, GtsRange * vol) { gdouble size = ftt_cell_size (cell); if (GFS_IS_MIXED (cell)) gts_range_add_value (vol, size*size*GFS_STATE (cell)->solid->a); else gts_range_add_value (vol, size*size); }
false
false
false
false
false
0
RemoveLine(int line) { // Retain the markers from the deleted line by oring them into the previous line if (markers.Length()) { if (line > 0) { MergeMarkers(line - 1); } markers.Delete(line); } }
false
false
false
false
false
0
printantsynset(SynsetPtr synptr, char *tail, int anttype, int definition) { int i, wdcnt; char tbuf[SMLINEBUF]; char *str; int first = 1; tbuf[0] = '\0'; if (offsetflag) sprintf(tbuf,"{%8.8ld} ", synptr->hereiam); if (fileinfoflag) { sprintf(tbuf + strlen(tbuf),"<%s> ", lexfiles[synptr->...
true
true
false
false
false
1
toCBuffer(OutBuffer *buf, HdrGenState *hgs) { if (!hgs->hdrgen) { buf->writestring("shared "); StaticDtorDeclaration::toCBuffer(buf, hgs); } }
false
false
false
false
false
0
_zin_prod(a,b,i0,flag) ZVEC *a,*b; u_int i0, flag; { u_int limit; if ( a==ZVNULL || b==ZVNULL ) error(E_NULL,"_zin_prod"); limit = min(a->dim,b->dim); if ( i0 > limit ) error(E_BOUNDS,"_zin_prod"); return __zip__(&(a->ve[i0]),&(b->ve[i0]),(int)(limit-i0),flag); }
false
false
false
true
false
1
new_integer(struct alisp_instance *instance, long value) { struct alisp_object * obj; obj = search_object_integer(instance, value); if (obj != NULL) return obj; obj = new_object(instance, ALISP_OBJ_INTEGER); if (obj) { list_add(&obj->list, &instance->used_objs_list[value & ALISP_OBJ_PAIR_HASH_MASK][ALISP_OBJ...
false
false
false
false
false
0
ResetCatParts(uint8 cat) { // ADUNANZA BEGIN #if 0 for (FileQueue::iterator it = m_filelist.begin(); it != m_filelist.end(); it++) { #else for (FileQueue::iterator it = m_filelist.begin(); it != m_filelist.end(); ++it) { #endif // ADUNANZA END CPartFile* file = *it; file->RemoveCategory(cat); } // ADUNANZA BEGIN...
false
false
false
false
false
0
Sys_Milliseconds( void ) { static qboolean first_time = true; static time_t start_secs = 0; int errorflag; struct timespec tp; long timeofday; errorflag = clock_gettime( CLOCK_REALTIME, &tp ); if ( errorflag ) { Com_Printf("Sys_Milliseconds: clock_gettime() error\n"); timeofday = 0L; // fail } else if ...
false
false
false
false
false
0
H5FD_core_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, size_t size, const void *buf) { H5FD_core_t *file = (H5FD_core_t*)_file; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT HDassert(file && file->pub.cls); HDasse...
false
false
false
false
false
0
remove_solutions (struct up_solution *update, struct problem_list *pblist, struct board *board, char **matrix, short psol) { short x, y, z, j, ps; short tsol = 0, *temp, *tprobs; short probs = 0; temp = (short *) malloc (MAXSOLS * sizeof (short)); tprobs = (short *) malloc (GROUPS * sizeof (short)); i...
false
true
false
false
true
1
qlcnic_83xx_alloc_mbx_args(struct qlcnic_cmd_args *mbx, struct qlcnic_adapter *adapter, u32 type) { int i, size; u32 temp; const struct qlcnic_mailbox_metadata *mbx_tbl; memset(mbx, 0, sizeof(struct qlcnic_cmd_args)); mbx_tbl = qlcnic_83xx_mbx_tbl; size = ARRAY_SIZE(qlcnic_83xx_mbx_tbl); for (i = 0; i...
false
false
false
false
false
0
MatrixMultiply( const ADD& B, vector<ADD> z) const { int nz = z.size(); DdManager *mgr = checkSameManager(B); DdNode **Z = new DdNode *[nz]; for (int i = 0; i < nz; i++) { Z[i] = z[i].node; } DdNode *result = Cudd_addMatrixMultiply(mgr, node, B.node, Z, nz); delete [] Z; checkReturn...
false
false
false
false
false
0
_dep_agent(void *args) { struct job_record *job_ptr = (struct job_record *) args; slurmctld_lock_t job_write_lock = { NO_LOCK, WRITE_LOCK, NO_LOCK, NO_LOCK}; char *end_ptr = NULL, *tok; int cnt = 0; usleep(100000); lock_slurmctld(job_write_lock); if (job_ptr && job_ptr->details && (job_ptr->magic == JOB_MAGIC...
false
false
false
false
false
0
gdk_pixbuf_new_from_xpm_data (const char **data) { GdkPixbuf *(* load_xpm_data) (const char **data); GdkPixbuf *pixbuf; GError *error = NULL; GdkPixbufModule *xpm_module; g_return_val_if_fail (data != NULL, NULL); xpm_module = _gdk_pixbuf_get_named_module ("xpm", &error...
false
false
false
false
false
0
_s_print_cdr(FILE *fp, CELL *cell) { if (!Null(cell)) { if (Consp(cell)) { fprintf(fp, " "); _s_print_(fp, _Car(cell)); _s_print_cdr(fp, _Cdr(cell)); } else { fputc(' ', fp); _s_print_(fp, cell); } } return cell; }
false
false
false
false
false
0
fetch_cursor_param_value(ExprContext *econtext, int paramId) { ParamListInfo paramInfo = econtext->ecxt_param_list_info; if (paramInfo && paramId > 0 && paramId <= paramInfo->numParams) { ParamExternData *prm = &paramInfo->params[paramId - 1]; /* give hook a chance in case parameter is dynamic */ if (!OidI...
false
false
false
false
false
0
emitPreOp(const Instruction *i) { if (i->encSize == 8) { emitForm_B(i, HEX64(60000000, 00000000)); if (i->op == OP_PREEX2) code[0] |= 0x20; if (i->src(0).mod.abs()) code[0] |= 1 << 6; if (i->src(0).mod.neg()) code[0] |= 1 << 8; } else { emitForm_S(i, i->op == OP_PREEX2 ? 0...
false
false
false
false
false
0
kadm5_delete_principal(void *server_handle, krb5_principal principal) { unsigned int ret; krb5_db_entry *kdb; osa_princ_ent_rec adb; kadm5_server_handle_t handle = server_handle; CHECK_HANDLE(server_handle); krb5_clear_error_message(handle->context); ...
false
false
false
false
false
0
inputMaskCharacter(char inputMaskCharacter_) { _editor->inputMaskCharacter(inputMaskCharacter_); //this could either take a new inputMaskCharacter into account, or reset it back. if(autoMaskInput() == MSTrue) generateInputMask(); }
false
false
false
false
false
0
prepare_tpacket_socket(pcap_t *handle) { #ifdef HAVE_TPACKET2 socklen_t len; int val; #endif handle->md.tp_version = TPACKET_V1; handle->md.tp_hdrlen = sizeof(struct tpacket_hdr); #ifdef HAVE_TPACKET2 /* Probe whether kernel supports TPACKET_V2 */ val = TPACKET_V2; len = sizeof(val); if (getsockopt(handle->fd...
false
false
false
false
false
0
parse_dirplusfile(char *buf, size_t nbytes, struct file *file, struct dir_context *ctx, u64 attr_version) { struct fuse_direntplus *direntplus; struct fuse_dirent *dirent; size_t reclen; int over = 0; int ret; while (nbytes >= FUSE_NAME_OFFSET_DIRENTPLUS) { direntplus = (struct fuse_direntplus *) buf; ...
false
false
false
false
false
0
sfnts_next_elem(sfnts_reader *r) { ref s; int code; if (r->error) return; do { r->index++; code = array_get(r->memory, r->sfnts, r->index, &s); if (code == e_rangecheck) { r->error |= 2; } else if (code < 0) { r->error |= 1; } if (r->error) r...
false
false
false
false
false
0
found_unsupported_format (struct GRD_HEADER *h, char *text, char *file) { GMT_LONG i; static char *not_supported[N_NOT_SUPPORTED] = {"rb", "rf", "sf", "sd", "af", "gd"}; for (i = 0; i < N_NOT_SUPPORTED; i++) { /* Only allow netcdf (both v3 and new) and native binary output */ if (h->type == GMT_grd_format_decoder ...
false
false
false
false
false
0
strio_eof(VALUE self) { struct StringIO *ptr = readable(StringIO(self)); if (ptr->pos < RSTRING_LEN(ptr->string)) return Qfalse; return Qtrue; }
false
false
false
false
false
0
matewnck_pager_drag_motion_timeout (gpointer data) { MatewnckPager *pager = MATEWNCK_PAGER (data); MatewnckWorkspace *active_workspace, *dnd_workspace; pager->priv->dnd_activate = 0; active_workspace = matewnck_screen_get_active_workspace (pager->priv->screen); dnd_workspace = matewnck_screen_get_workspac...
false
false
false
false
false
0
cb_ok_clicked (G_GNUC_UNUSED GtkButton *button, AutoFormatState *state) { if (state->selected_template) cmd_selection_autoformat (WORKBOOK_CONTROL (state->wbcg), format_template_clone (state->selected_template)); gtk_widget_destroy (GTK_WIDGET (state->dialog)); }
false
false
false
false
false
0
dw_mass( FMField *out, FMField *coef, FMField *state, int32 offset, FMField *bf, VolumeGeometry *vg, int32 *conn, int32 nEl, int32 nEP, int32 *elList, int32 elList_nRow, int32 isDiff ) { int32 ii, iel, dim, nQP, ret = RET_OK; FMField *st = 0, *fu = 0, *ftfu = 0, *ftf1 = 0, *ftf = 0; ...
false
false
false
false
false
0
finish_join(i_ctx_t *i_ctx_p) { os_ptr op = osp; gs_context_t *current = (gs_context_t *)i_ctx_p; gs_scheduler_t *psched = current->scheduler; gs_context_t *pctx; int code; if ((code = context_param(psched, op, &pctx)) < 0) return code; if_debug2('\'', "[']finish_join %ld, status = ...
false
false
false
false
true
1
bit_copy(PutBitContext *pb, GetBitContext *gb) { int bits_left = get_bits_left(gb); while (bits_left >= MIN_CACHE_BITS) { put_bits(pb, MIN_CACHE_BITS, get_bits(gb, MIN_CACHE_BITS)); bits_left -= MIN_CACHE_BITS; } if (bits_left > 0) { put_bits(pb, bits_left, get_bits(gb, bits_left...
false
false
false
false
false
0
ghwp_file_v5_get_hwp_version_string (GHWPFile *file) { g_return_val_if_fail (GHWP_IS_FILE_V5 (file), NULL); return g_strdup_printf ("%d.%d.%d.%d", GHWP_FILE_V5(file)->major_version, GHWP_FILE_V5(file)->minor_version, GHWP_FIL...
false
false
false
false
false
0
get_position(const bam_pileup1_t *p, int *len) { int icig, n_tot_bases = 0, iread = 0, edist = p->qpos + 1; for (icig=0; icig<p->b->core.n_cigar; icig++) { // Conversion from uint32_t to MIDNSHP // 0123456 // MIDNSHP int cig = bam1_cigar(p->b)[icig] & BAM_CIGAR_MASK; ...
false
false
false
false
false
0
G_spawn(const char *command, ...) { const char *args[MAX_ARGS]; int num_args = 0, i; va_list va; int status = -1; va_start(va, command); for (i = 0; ; i++) { const char *arg = va_arg(va, const char *); args[num_args++] = arg; if (!arg) break; } va_end(va); status = G_spaw...
true
true
false
false
false
1
plugin_get_config (struct slapdplugin *plugin) { struct slapdplugin *temp = plugin; PR_ASSERT (plugin); while (temp->plg_group) { temp = temp->plg_group; } return &(temp->plg_conf); }
false
false
false
false
false
0
update(size_t index, ValType delta) { // Handle previously unseen weights while(index>=m_weights.size()) { m_weights.push_back(0.0); m_totals.push_back(0.0); m_lastUpdated.push_back(0); } // Book keeping for w = w + delta m_totals[index] += (m_numUpdates - m_lastUpdated[index]) * m_weights[index...
false
false
false
false
false
0
memberof_get_groups_callback(Slapi_Entry *e, void *callback_data) { Slapi_DN *group_sdn = slapi_entry_get_sdn(e); char *group_dn = slapi_entry_get_ndn(e); Slapi_Value *group_dn_val = 0; Slapi_ValueSet *groupvals = *((memberof_get_groups_data*)callback_data)->groupvals; int rc = 0; if(slapi_is_shutting_down()){ ...
false
false
false
false
false
0
mongo_message_send( mongo *conn, mongo_message *mm ) { mongo_header head; /* little endian */ int res; bson_little_endian32( &head.len, &mm->head.len ); bson_little_endian32( &head.id, &mm->head.id ); bson_little_endian32( &head.responseTo, &mm->head.responseTo ); bson_little_endian32( &head.op,...
false
false
false
false
false
0
encode_rgb_frame(FFV1Context *s, uint32_t *src, int w, int h, int stride){ int x, y, p, i; const int ring_size= s->avctx->context_model ? 3 : 2; int_fast16_t sample_buffer[3][ring_size][w+6], *sample[3][ring_size]; s->run_index=0; memset(sample_buffer, 0, sizeof(sample_buffer)); for(y=0; y<h; ...
false
false
false
false
true
1
update_or_history(or_history_t *hist, time_t when) { tor_assert(hist); if (hist->up_since) { tor_assert(!hist->down_since); hist->uptime += (when - hist->up_since); hist->up_since = when; } else if (hist->down_since) { hist->downtime += (when - hist->down_since); hist->down_since = when; } }
false
false
false
false
false
0
check_outerjoin_delay(PlannerInfo *root, Relids *relids_p, /* in/out parameter */ Relids *nullable_relids_p, /* output parameter */ bool is_pushed_down) { Relids relids; Relids nullable_relids; bool outerjoin_delayed; bool found_some; /* fast path if no outer joins */ if (root->oj_inf...
false
false
false
false
false
0
_elm_diskselector_smart_focus_next(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next) { Eina_List *items = NULL; Eina_List *elist = NULL; Elm_Diskselector_Item *it; ELM_DISKSELECTOR_CHECK(obj) EINA_FALSE; ELM_DISKSELECTOR_DATA_GET(o...
false
false
false
false
false
0
__mark_sit_entry_dirty(struct f2fs_sb_info *sbi, unsigned int segno) { struct sit_info *sit_i = SIT_I(sbi); if (!__test_and_set_bit(segno, sit_i->dirty_sentries_bitmap)) { sit_i->dirty_sentries++; return false; } return true; }
false
false
false
false
false
0
bam_block_find_free(kct_bam_t &bam) { unsigned int a; for (a = 0;a < 8 * sizeof(kct_bam_t);a++) { if (bam_block_available(bam, a)) { bam_block_allocate(bam, a); return a * 256; } } return 0; }
false
false
false
false
false
0
mgt_cpu_to_le(int type, void *data) { switch (type) { case OID_TYPE_U32: *(u32 *) data = cpu_to_le32(*(u32 *) data); break; case OID_TYPE_BUFFER:{ struct obj_buffer *buff = data; buff->size = cpu_to_le32(buff->size); buff->addr = cpu_to_le32(buff->addr); break; } case OID_TYPE_BSS:{ struct obj_...
false
false
false
false
false
0
atEnd() const { return (d->result == KFilterBase::End) && QIODevice::atEnd() // take QIODevice's internal buffer into account && d->filter->device()->atEnd(); }
false
false
false
false
false
0
watch_flags_from_poll_revents (short revents) { unsigned int condition = 0; if (revents & _DBUS_POLLIN) condition |= DBUS_WATCH_READABLE; if (revents & _DBUS_POLLOUT) condition |= DBUS_WATCH_WRITABLE; if (revents & _DBUS_POLLHUP) condition |= DBUS_WATCH_HANGUP; if (revents & _DBUS_POLLERR) co...
false
false
false
false
false
0
DumpResource(FILE *to,struct resource *rcur) { uint32 len; int ch; rcur->merged_off = ftell(to); fseek(rcur->srcf,rcur->src_off,SEEK_SET); len = getlong(rcur->srcf); if ( len==EOF ) { fprintf( stderr, "Bad resource length at offset %d\n", rcur->src_off ); exit(1); } putlong(len,to); ...
false
false
false
false
false
0
_theme_file_used(Eina_List *tlist, const char *filename) { E_Config_Theme *theme; Eina_List *l; if (!filename) return 0; EINA_LIST_FOREACH(tlist, l, theme) if (theme->file == filename) return 1; return 0; }
false
false
false
false
false
0
dwc2_kill_urbs_in_qh_list(struct dwc2_hsotg *hsotg, struct list_head *qh_list) { struct dwc2_qh *qh, *qh_tmp; struct dwc2_qtd *qtd, *qtd_tmp; list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) { dwc2_host_complete...
false
false
false
false
false
0
ConstantFoldExtractValueInstruction(Constant *Agg, const unsigned *Idxs, unsigned NumIdx) { // Base case: no indices, so return the entire value. if (NumIdx == 0) return Agg; if (isa<UndefValue>(Agg)) // ...
false
false
false
false
false
0
matrix_red_row_echelon(matrix_t *mat) { int i, j, lead, r; double t1, t2; lead = 0; matrix_t *res = matrix_copy(mat); for (r = 0; r < res->nrows; ++r) { if (res->ncols <= lead) break; i = r; //while((res->data[i][lead]) == 0) wh...
false
false
false
false
false
0
mbfl_filt_conv_any_7bit(int c, mbfl_convert_filter *filter) { if (c >= 0 && c < 0x80) { CK((*filter->output_function)(c, filter->data)); } return c; }
false
false
false
false
false
0
bytes_per_sample ( unsigned char bt ) { int recsiz = 1; if ( S710_HAS_ALTITUDE(bt) ) recsiz += 2; if ( S710_HAS_SPEED(bt) ) { if ( S710_HAS_ALTITUDE(bt) ) recsiz -= 1; recsiz += 2; if ( S710_HAS_POWER(bt) ) recsiz += 4; if ( S710_HAS_CADENCE(bt) ) recsiz += 1; } return recsiz; }
false
false
false
false
false
0
zeitgeist_data_source_registry_extension_real_register_data_source_data_free (gpointer _data) { ZeitgeistDataSourceRegistryExtensionRegisterDataSourceData* _data_; _data_ = _data; _g_free0 (_data_->unique_id); _g_free0 (_data_->name); _g_free0 (_data_->description); _g_variant_unref0 (_data_->event_templates); _...
false
false
false
false
false
0
reduceu(const void* src, int sstride, int uw, int vw, void* dst, int dstride, DataType dt, int nchan) { switch (dt) { case dt_uint8: ::reduceu((const uint8_t*) src, sstride, uw, vw, (uint8_t*) dst, dstride, nchan); break; case dt_half: ::reduceu((const PtexHalf*) src, sstride, uw, vw, ...
false
false
false
false
false
0
settings_value_as_int(char *value, int def) { int intval; if (value) { errno = 0; intval = strtol(value, NULL, 10); if (errno == 0) { return intval; } } return def; }
false
false
false
false
false
0
detune(detune_state *s, float x) { float *a1, *a2, *b1, *b2, a, b; float c; float y; // advance *(s->dl.p) = x; (s->dl.p)++; wrap(DETUNE_RING_m-1, s->dl.w, &s->dl.p); if (s->delta == 1) s->offset = s->dl.p - s->dl.w; int i = floor(s->offset); float frac = s->offset - i;...
false
false
false
false
false
0
l2tp_session_try_send(struct l2tp_sess_t *sess, struct l2tp_packet_t *pack) { if (sess->paren_conn->send_queue_len >= sess->paren_conn->peer_rcv_wnd_sz) return -1; l2tp_session_send(sess, pack); return 0; }
false
false
false
false
false
0
kdb_input_flush(void) { get_char_func *f; int res; int flush_delay = 1; while (flush_delay) { flush_delay--; empty: touch_nmi_watchdog(); for (f = &kdb_poll_funcs[0]; *f; ++f) { res = (*f)(); if (res != -1) { flush_delay = 1; goto empty; } } if (flush_delay) mdelay(1); } }
true
true
false
false
false
1
initialize_openssl(const SSL_METHOD *method, const char *ciphers) { SSL_CTX *ssl_ctx; (void)SSL_library_init(); SSL_load_error_strings(); (void)atexit(ERR_free_strings); /* * In earlier versions, we called * * OPENSSL_config(NULL); * (void)atexit(CONF_modules_free); * * at this point. The OPENSSL_...
false
false
false
false
false
0
ran2() { gint i,j; gdouble f; i=j=0; /* generate 2 random (non 0) integers */ while(!i) i = rand(); while(!j) j = rand(); /* convert to a single float (0.0,1.0] */ if (i > j) f = (gdouble) j / (gdouble) i; else f = (gdouble) i / (gdouble) j; return f; }
false
false
false
false
false
0
host_is_centry_referenced(const lListElem *this_elem, const lListElem *centry) { bool ret = false; DENTER(TOP_LAYER, "host_is_centry_referenced"); if (this_elem != NULL) { const char *name = lGetString(centry, CE_name); const lList *ce_values = lGetList(this_elem, EH_consumable_config_list); ...
false
false
false
false
false
0
enterLoop(void *owner, bool showIt) { void *old_owner = _loop_owner; int l = _loopLevel; GtkWindowGroup *oldGroup; oldGroup = enterGroup(); if (showIt) ((gControl *)owner)->show(); _loopLevel++; _loop_owner = owner; do { MAIN_do_iteration(false); } while (_loopLevel > l); _loop_owner = old_owner;...
false
false
false
false
false
0
http_rxhdr(struct http *hp) { int i; char *p; CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); hp->prxbuf = 0; hp->body = NULL; while (1) { http_rxchar(hp, 1); p = hp->rxbuf + hp->prxbuf - 1; for (i = 0; p > hp->rxbuf; p--) { if (*p != '\n') break; if (p - 1 > hp->rxbuf && p[-1] == '\r') p--; if (++i ==...
false
false
false
false
false
0
sorted_set_tests_test_last (SortedSetTests* self) { GeeSortedSet* test_set = NULL; GeeCollection* _tmp0_ = NULL; GeeSortedSet* _tmp1_ = NULL; gboolean _tmp2_ = FALSE; GeeSortedSet* _tmp7_ = NULL; gboolean _tmp8_ = FALSE; GeeSortedSet* _tmp9_ = NULL; gboolean _tmp10_ = FALSE; GeeSortedSet* _tmp11_ = NULL; gboo...
false
false
false
false
false
0
RunScript(cmCTest* ctest, const char *sname, bool InProcess) { cmCTestScriptHandler* sh = new cmCTestScriptHandler(); sh->SetCTestInstance(ctest); sh->AddConfigurationScript(sname,InProcess); sh->ProcessHandler(); delete sh; return true; }
false
false
false
false
false
0
assuan_disconnect (assuan_context_t ctx) { if (ctx) { assuan_write_line (ctx, "BYE"); ctx->finish_handler (ctx); ctx->deinit_handler (ctx); ctx->deinit_handler = NULL; _assuan_release_context (ctx); } }
false
false
false
false
false
0
storeSwapMetaPack(tlv * tlv_list, int *length) { int buflen = 0; tlv *t; int j = 0; char *buf; assert(length != NULL); buflen++; /* STORE_META_OK */ buflen += sizeof(int); /* size of header to follow */ for (t = tlv_list; t; t = t->next) buflen += sizeof(char) + sizeof(int) + t->lengt...
false
false
false
true
false
1
cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_sensors_config_arguments *cmd_args = state->input; error_t ret; switch (key) { case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: ret = ...
false
false
false
false
false
0
HeaderFocus(int h, int offset) { register struct hdr_line *l; register int i; int last = 0; if(offset == -1) /* focus on last line */ last = 1; l = headents[h].hd_text; while(1){ if(last && l->next == NULL){ break; } else{ if((i=ucs4_strlen(l->text)) >= offset) ...
false
false
false
false
false
0
isEndpointNotSupported(const std::string& endpoint) const { const std::string::size_type pos = endpoint.find("://"); return pos != std::string::npos && lower(endpoint.substr(0, pos)) != "gsiftp"; }
false
false
false
false
false
0
child_setup (gpointer user_data) { ChildData *child_data = user_data; gint i; gint result; /* We're on the child side now. "Rename" the file descriptors in * child_data.fds[] to stdin/stdout/stderr. * * We don't close the originals. It's possible that the originals * should not be closed and if t...
false
false
false
false
false
0
e_def_10_( fortint * inputArray, unsigned char * gribSection1, fortint * bitPointer) { /* // Encodes ECMWF local definition 10 (from byte 41 onwards) into // gribSection1 using integer array values in inputArray. // // inputArray[0] corresponds to KSEC1(37) in the description at // http://www.ecmwf.int/publicatio...
false
false
false
false
false
0
removeConnection(Connection *connection) { if (peers.contains(connection->peerAddress())) { peers.remove(connection->peerAddress()); QString nick = connection->name(); if (!nick.isEmpty()) emit participantLeft(nick); } connection->deleteLater(); }
false
false
false
false
false
0
resend_events (GstPad * pad, GstEvent ** event, gpointer user_data) { GstRTPMux *rtp_mux = user_data; if (GST_EVENT_TYPE (*event) == GST_EVENT_CAPS) { GstCaps *caps; gst_event_parse_caps (*event, &caps); gst_rtp_mux_setcaps (pad, rtp_mux, caps); } else { gst_pad_push_event (rtp_mux->srcpad, gst_...
false
false
false
false
false
0
gf_size(gf_t *gf) { gf_internal_t *h; int s; s = sizeof(gf_t); h = (gf_internal_t *) gf->scratch; s += gf_scratch_size(h->w, h->mult_type, h->region_type, h->divide_type, h->arg1, h->arg2); if (h->mult_type == GF_MULT_COMPOSITE) s += gf_size(h->base_gf); return s; }
false
false
false
false
false
0
fuse_ll_destroy(void *data) { struct fuse_ll *f = (struct fuse_ll *) data; struct fuse_ll_pipe *llp; if (f->got_init && !f->got_destroy) { if (f->op.destroy) f->op.destroy(f->userdata); } llp = pthread_getspecific(f->pipe_key); if (llp != NULL) fuse_ll_pipe_free(llp); pthread_key_delete(f->pipe_key); pt...
false
false
false
false
false
0
mpegpsmux_create_streams (MpegPsMux * mux) { /* Create stream for each pad */ GstFlowReturn ret = GST_FLOW_OK; GSList *walk = mux->collect->data; /* Create the streams */ while (walk) { GstCollectData *c_data = (GstCollectData *) walk->data; MpegPsPadData *ps_data = (MpegPsPadData *) walk->data; ...
false
false
false
false
false
0
nemo_clipboard_real_set_up (gpointer target, GtkUIManager *ui_manager, gboolean shares_selection_changes, SelectAllCallback select_all_callback, ConnectCallbacksFunc connect_callbacks, ConnectCallbacksFunc disconnect_callbacks) { TargetCallbackData *target_data; if (g_object_get_data (G_OBJECT (t...
false
false
false
false
false
0
error(const yy::location& l, const std::string& msg) { if (mWant2ndPass) return; mErrorOccured = true; warning(l, msg); }
false
false
false
false
false
0
dbs_put(const DB *dbs, DBT *key, const DBT *data, unsigned int flags) { DBT blob; int ret = 0; DBS *dbsp = (DBS *)dbs; DB *db = (DB *)dbs->internal; dbs_freemap(dbsp); /* If the db is readonly, just pass the data down to rdb and let it fail */ if (!dbsp->readOnly) { DBT oldData; int ret1...
false
false
false
false
false
0
seqiv_geniv(struct seqiv_ctx *ctx, u8 *info, u64 seq, unsigned int ivsize) { unsigned int len = ivsize; if (ivsize > sizeof(u64)) { memset(info, 0, ivsize - sizeof(u64)); len = sizeof(u64); } seq = cpu_to_be64(seq); memcpy(info + ivsize - len, &seq, len); crypto_xor(info, ctx->salt, ivsize); }
false
false
false
false
false
0
os_adjust_filename(CHAR *filename) { CHAR *p; if(filename) { p = filename; while(*p) { if( *p == '\'' || *p == '\"' || *p == '\\' || *p == '\t' || *p == '=' || *p == ',' || *p == ';' || *p == ':' || *p == '*' || *p == '?' || *p == '|' || *p == '/' || *p == '>'...
false
false
false
false
false
0
setExistingAttribute(const char *key, const char *value) { string itkey = string(key) + "=" + value; unordered_map<string,size_t>::iterator it = this->disused_attributes.find(itkey); if (it == this->disused_attributes.end()) this->disused_attributes[itkey] = 1; else it->second++; }
false
false
false
false
false
0
SetImageExtent(Image *image, const size_t columns,const size_t rows) { if ((columns == 0) || (rows == 0)) return(MagickFalse); image->columns=columns; image->rows=rows; return(SyncImagePixelCache(image,&image->exception)); }
false
false
false
false
false
0
asic_should_init(struct hfi1_devdata *dd) { unsigned long flags; struct hfi1_devdata *tmp, *peer = NULL; spin_lock_irqsave(&hfi1_devs_lock, flags); /* Find our peer device */ list_for_each_entry(tmp, &hfi1_dev_list, list) { if ((HFI_BASE_GUID(dd) == HFI_BASE_GUID(tmp)) && dd->unit != tmp->unit) { peer ...
false
false
false
false
false
0
verify_edge_list (FILE *f, struct edge_list *elist) { int pred, succ, index; edge e; basic_block bb, p, s; edge_iterator ei; FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb) { FOR_EACH_EDGE (e, ei, bb->succs) { pred = e->src->index; succ = e->dest->index; index = EDGE_INDEX (...
false
false
false
true
false
1
log(const c8* message, const c8* hint, ELOG_LEVEL ll) { if (Logger) Logger->log(message, hint, ll); }
false
false
false
false
false
0
MangleClassName(char * className) { char output[1024]; int c, d = 0; char ch; for(c = 0; (ch = className[c]); c++) { if(ch == ' ') output[d++] = '_'; else if(ch == '*') { output[d++] = '_'; output[d++] = 'P'; output[d++] = 'T'; output[d++] = 'R'; output[d++] = '_'; } else if(ch == '<') { output[d++] = '_'; output[d++]...
true
true
false
false
false
1
sort(int l, int r, int dim, int rank[]) { int i; if (r > l) { i = partition(l, r, dim, rank); sort(l, i - 1, dim, rank); sort(i + 1, r, dim, rank); } }
false
false
false
false
false
0
enum_list(int first, int last) { char buf[50]; for(int i = first; i <= last; i++) { snprintf(buf, sizeof(buf), "%d", i); item(buf, i); } }
false
false
false
false
false
0
smu_free_memory(void *device, void *handle) { cgs_handle_t cgs_handle = (cgs_handle_t)handle; if (device == NULL || handle == NULL) return -EINVAL; cgs_kunmap_gpu_mem(device, cgs_handle); cgs_gunmap_gpu_mem(device, cgs_handle); cgs_free_gpu_mem(device, cgs_handle); return 0; }
false
false
false
false
false
0
enable_count_show(struct device *dev, struct device_attribute *attr, char *buf) { struct devfreq_event_dev *edev = to_devfreq_event(dev); if (!edev || !edev->desc) return -EINVAL; return sprintf(buf, "%d\n", edev->enable_count); }
false
false
false
false
false
0
pixaWriteStream(FILE *fp, PIXA *pixa) { l_int32 n, i; PIX *pix; PROCNAME("pixaWriteStream"); #if !HAVE_LIBPNG /* defined in environ.h and config_auto.h */ return ERROR_INT("no libpng: can't write data", procName, 1); #endif /* !HAVE_LIBPNG */ if (!fp) return ERROR_INT(...
false
false
false
false
false
0
dump_cattrs_for_method_params (MonoImage *m, guint32 midx, MonoMethodSignature *sig) { MonoTableInfo *methodt; MonoTableInfo *paramt; guint param_index, lastp, i; methodt = &m->tables [MONO_TABLE_METHOD]; paramt = &m->tables [MONO_TABLE_PARAM]; param_index = mono_metadata_decode_row_col (methodt, midx, MONO_METH...
false
false
false
false
false
0
shell_cf( ConfigArgs *c ) { struct shellinfo *si = (struct shellinfo *) c->be->be_private; char ***arr = &si->si_bind; if ( c->op == SLAP_CONFIG_EMIT ) { struct berval bv; if ( !arr[c->type] ) return 1; bv.bv_val = ldap_charray2str( arr[c->type], " " ); bv.bv_len = strlen( bv.bv_val ); ber_bvarray_add( &c...
false
false
false
false
false
0
init_rand(struct frand_state *state, int use64) { state->use64 = use64; if (!use64) __init_rand32(&state->state32, 1); else __init_rand64(&state->state64, 1); }
false
false
false
false
false
0