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
fake(double ram, double avail_ram, int n) { safe_strcpy(type, proc_type_name_xml(PROC_TYPE_INTEL_GPU)); safe_strcpy(version, "1.4.3"); safe_strcpy(name, "foobar"); count = n; available_ram = avail_ram; have_opencl = true; for (int i=0; i<count; i++) { device_nums[i] = i; } se...
false
false
false
false
false
0
ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) { int j,k; unsigned int i; unsigned char buf[sizeof(long)+1]; long d; a->type=V_ASN1_ENUMERATED; if (a->length < (int)(sizeof(long)+1)) { if (a->data != NULL) OPENSSL_free(a->data); if ((a->data=(unsigned char *)OPENSSL_malloc(sizeof(long)+1)) != NULL) ...
false
false
false
false
false
0
PyObject_RichCompare(PyObject *v, PyObject *w, int op) { PyObject *res; assert(Py_LT <= op && op <= Py_GE); if (Py_EnterRecursiveCall(" in cmp")) return NULL; /* If the types are equal, and not old-style instances, try to get out cheap (don't bother with coercions etc.). */ if (v->o...
false
false
false
false
false
0
HandleRequestActiveSource(const cec_command &command) { if (m_processor->CECInitialised()) { if (!SLInitialised()) TransmitVendorCommandSLAckInit(m_processor->GetPrimaryDevice()->GetLogicalAddress(), command.initiator); CCECCommandHandler::HandleRequestActiveSource(command); } return CEC_ABORT_REA...
false
false
false
false
false
0
set_x_gradient(trap_gradient *xg, const trap_gradient *lg, const trap_gradient *rg, const trap_line *l, const trap_line *r, int il, int ir, int num_components) { if (lg->den == 0 || rg->den == 0) { /* A wedge doesn't use a gradient by X. */ int i; xg->den = 1; for (i = ...
false
false
false
false
false
0
vtk_jpeg_output_message (j_common_ptr cinfo) { char buffer[JMSG_LENGTH_MAX]; /* Create the message */ (*cinfo->err->format_message) (cinfo, buffer); vtk_jpeg_error_mgr * err = reinterpret_cast<vtk_jpeg_error_mgr*>(cinfo->err); vtkWarningWithObjectMacro(err->JPEGReader, "libjpeg er...
false
false
false
false
false
0
radeon_pll2_wait_for_read_update_complete(struct drm_device *dev) { struct radeon_device *rdev = dev->dev_private; int i = 0; /* FIXME: Certain revisions of R300 can't recover here. Not sure of the cause yet, but this workaround will mask the problem for now. Other chips usually will pass at the very firs...
false
false
false
false
false
0
meta_parse(const char *device_path) { #ifdef HAVE_LIBXML2 META_ROOT *root = calloc(1, sizeof(META_ROOT)); root->dl_count = 0; xmlDocPtr doc; _findMetaXMLfiles(root, device_path); uint8_t i; for (i = 0; i < root->dl_count; i++) { char *base = NULL; base = str_printf("%s" DIR_SEP...
false
false
false
false
false
0
mapping_with_mep_from_multipol(gint lmax) { Grid* mep = NULL; GabEditTypeGrid oldTypeGrid = TypeGrid; mep = compute_mep_grid_using_multipol_from_orbitals(grid->N, grid->limits, lmax); TypeGrid = oldTypeGrid; if(!mep) return; mapping_cube_by_an_other_cube(mep); free_grid(mep); }
false
false
false
false
false
0
gkm_credential_set_property (GObject *obj, guint prop_id, const GValue *value, GParamSpec *pspec) { GkmCredential *self = GKM_CREDENTIAL (obj); GkmObject *object; switch (prop_id) { case PROP_OBJECT: object = g_value_get_object (value); if (object) gkm_credential_connect (sel...
false
false
false
false
false
0
main(int argc, char **argv) { std::vector<std::string> args; for(int i = 1; i < argc; i++) { args.push_back(argv[i]); } midasCLI cli; return cli.Perform(args); }
false
false
false
false
false
0
implicit_time_strategy(MESH *mesh, ADAPT_INSTAT *adapt) { FUNCNAME("implicit_time_strategy"); int iter, iter_s; ADAPT_STAT *adapt_s = adapt->adapt_space; REAL err_space, err_time, space_err_limit, time_err_limit, time_err_low; space_err_limit = adapt->tolerance * adapt->rel_space_error; time_err_lim...
false
false
false
false
false
0
pega_acc_axis(struct asus_laptop *asus, int curr, char *method) { int i, delta; unsigned long long val; for (i = 0; i < PEGA_ACC_RETRIES; i++) { acpi_evaluate_integer(asus->handle, method, NULL, &val); /* The output is noisy. From reading the ASL * dissassembly, timeout errors are returned with 1's * in ...
false
false
false
false
false
0
CMod_LoadSurfaces (lump_t *l) { texinfo_t *in; mapsurface_t *out; int i, count; in = (void *)(cmod_base + l->fileofs); if (l->filelen % sizeof(*in)) Com_Error (ERR_DROP, "CMod_LoadSurfaces: funny lump size"); count = l->filelen / sizeof(*in); if (count < 1) Com_Error (ERR_DROP, "Map with no sur...
false
false
false
false
false
0
conf_get_address(char *section, char *tag) { char *value = conf_get_str(section, tag); struct sockaddr *sa; if (!value) return 0; if (text2sockaddr(value, 0, &sa) == -1) return 0; return sa; }
false
false
false
false
false
0
add_ytics( FL_OBJECT * ob ) { FLI_XYPLOT_SPEC *sp = ob->spec; float tic = sp->ytic; int yr, ticl = 6, i; char buf[ 80 ], *label, *p; if ( sp->ytic <= 0 ) return; for ( i = 0; i < sp->num_yminor; i++ ) { yr = sp->ytic_minor[ i ]; fl_...
true
true
false
false
false
1
toShortString() const { if (m_type == NoResult || m_type == ResultError) return "*"; if (m_winner == Side::White) return "1-0"; if (m_winner == Side::Black) return "0-1"; return "1/2-1/2"; }
false
false
false
false
false
0
DoMoo1(CommandLine &) /*{{{*/ { // our trustworthy super cow since 2001 if (_config->FindI("quiet") >= 2) return printMooLine(); std::string const moo = getMooLine(); size_t const depth = moo.length()/4; c1out << OutputInDepth(depth, " ") << " (__) \n" << OutputInDepth(dept...
false
false
false
false
false
0
_slurm_rpc_delete_partition(slurm_msg_t * msg) { /* init */ int error_code = SLURM_SUCCESS; DEF_TIMERS; delete_part_msg_t *part_desc_ptr = (delete_part_msg_t *) msg->data; /* Locks: write job, read node, write partition */ slurmctld_lock_t part_write_lock = { NO_LOCK, WRITE_LOCK, READ_LOCK, WRITE_LOCK }; uid_t...
false
false
false
false
false
0
_lvname_disp(struct dm_report *rh, struct dm_pool *mem, struct dm_report_field *field, const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; char *repstr, *lvname; size_t len; if (lv_is_visible(lv)) return dm_report_field_string(r...
false
false
false
false
false
0
hdb_sqlite_step(krb5_context context, sqlite3 *db, sqlite3_stmt *stmt) { int ret; ret = sqlite3_step(stmt); while(((ret == SQLITE_BUSY) || (ret == SQLITE_IOERR_BLOCKED) || (ret == SQLITE_LOCKED))) { krb5_warnx(context, "hdb-sqlite: step busy: %d", (int)getpid()); sleep(1); ...
false
false
false
false
false
0
__lambda17_ (Block11Data* _data11_, const gchar* path_str) { CleanBuildFiles* self; GtkTreePath* path = NULL; const gchar* _tmp0_ = NULL; GtkTreePath* _tmp1_ = NULL; GtkTreeIter iter = {0}; gboolean active = FALSE; GtkListStore* _tmp2_ = NULL; GtkTreeIter _tmp3_ = {0}; GtkListStore* _tmp4_ = NULL; GtkTreeIter...
false
false
false
false
false
0
Status(wxString status) { mOutput->Status(status); }
false
false
false
false
false
0
balance_leaf_new_nodes_paste_whole(struct tree_balance *tb, struct item_head * const ih, const char * const body, struct item_head *insert_key, struct buffer_head **insert_ptr, int i) { struct buffer_head *tbS0 = PATH_PLAST_BUFFER(tb->tb_path); int n = B_NR...
false
false
false
false
false
0
tp_ps2_putbyte(int fd, byte b) { byte ack; # ifdef DEBUG_PUTBYTE gpm_report(GPM_PR_DEBUG,"Send real byte %X",b); # endif write(fd, &b, 1); read(fd, &ack, 1); if (ack == PS2_RESEND) { write(fd, &b, 1); read(fd, &ack, 1); } # ifdef DEBUG_PUTBYTE_ACK gpm_report(GPM_PR_DEBUG,"Responce %X to...
false
true
false
false
true
1
ath10k_scan_abort(struct ath10k *ar) { int ret; lockdep_assert_held(&ar->conf_mutex); spin_lock_bh(&ar->data_lock); switch (ar->scan.state) { case ATH10K_SCAN_IDLE: /* This can happen if timeout worker kicked in and called * abortion while scan completion was being processed. */ break; case ATH10K_SC...
false
false
false
false
false
0
ohash_key_hash(const void *key) { const struct ohash_pair *op = key; g_assert(key != NULL); ohash_table_check(op->oh); return (*op->oh->hash_func)(op->key); }
false
false
false
false
false
0
maildir_make(const char *maildir, int perm, int subdirperm, int folder) { char *q=malloc(strlen(maildir)+sizeof("/maildirfolder")); int fd= -1; if (!q) return -1; if (mkdir(maildir, perm) < 0 || chmod(maildir, perm) < 0 || mkdir(strcat(strcpy(q, maildir), "/tmp"), subdirperm) < 0 || chmod(q, subd...
false
true
false
false
true
1
diff_buf_idx_tp(buf, tp) buf_T *buf; tabpage_T *tp; { int idx; for (idx = 0; idx < DB_COUNT; ++idx) if (tp->tp_diffbuf[idx] == buf) break; return idx; }
false
false
false
false
false
0
limnObjectPartTransform(limnObject *obj, unsigned int partIdx, float xform[16]) { unsigned int vertIdxIdx; limnPart *part; limnVertex *vert; float tmp[4]; part= obj->part[partIdx]; for (vertIdxIdx=0; vertIdxIdx<part->vertIdxNum; vertIdxIdx++) { vert = obj->vert + part->vertIdx[v...
false
false
false
false
false
0
outwrite(const gs_memory_t *mem, const char *str, int len) { int code; FILE *fout; gs_lib_ctx_t *pio = mem->gs_lib_ctx; if (len == 0) return 0; if (pio->stdout_is_redirected) { if (pio->stdout_to_stderr) return errwrite(mem, str, len); fout = pio->fstdout2; }...
false
false
false
false
false
0
nameserver_prod_callback(evutil_socket_t fd, short events, void *arg) { struct nameserver *const ns = (struct nameserver *) arg; (void)fd; (void)events; EVDNS_LOCK(ns->base); nameserver_send_probe(ns); EVDNS_UNLOCK(ns->base); }
false
false
false
false
false
0
source_registry_object_added_by_owner (ESourceRegistry *registry, GDBusObject *dbus_object) { SourceClosure *closure; GSource *idle_source; ESource *source; g_return_if_fail (E_DBUS_IS_OBJECT (dbus_object)); source = source_registry_new_source (registry, dbus_object); g_re...
false
false
false
false
false
0
vline_tilde_stop(t_vline *x) { t_vseg *s1, *s2; for (s1 = x->x_list; s1; s1 = s2) s2 = s1->s_next, t_freebytes(s1, sizeof(*s1)); x->x_list = 0; x->x_inc = 0; x->x_inlet1 = x->x_inlet2 = 0; x->x_target = x->x_value; x->x_targettime = 1e20; }
false
false
false
false
false
0
print0x009e(std::ostream& os, const Value& value, const ExifData*) { if (value.count() != 10 || value.typeId() != unsignedShort) { return os << value; } std::string s; bool trim ...
false
false
false
false
false
0
get_first_free_wknd_since (Chromosome chromo, unsigned worker, unsigned since_day) { int day = 0; if (since_day >= chromo.length) { return -1; } for (unsigned test = since_day; test < chromo.length; test += WEEK) if (!is_working_the_weekend (chromo, worker, test / WEEK)) return the_...
false
false
false
false
false
0
main_window_create(void){ create_app_main_window(_("gPHPEdit")); main_window_create_prinbox(); /* add menu bar to main window */ main_window.menu = menubar_new (); gtk_box_pack_start (GTK_BOX (main_window.prinbox), main_window.menu, FALSE, FALSE, 0); gtk_widget_show_all (main_window.menu); main_window....
false
false
false
false
false
0
gdb_util_string_parse_separator (const gint nItems, gchar *szStrIn, const gchar chSep) { gchar **szAllocPtrs = (char**)g_new( gchar*, nItems ); if( NULL != szAllocPtrs ) { int i ; gboolean bOK = TRUE ; gchar *p = szStrIn ; for( i = 0 ; i < nItems ; i ++ ) { gchar *szp ; szp = strchr( p, ...
false
false
false
false
false
0
create_pulldown_combo(display_data_t *display_data, int count) { GtkListStore *store = NULL; GtkWidget *combo = NULL; GtkTreeIter iter; GtkCellRenderer *renderer = NULL; int i=0; store = gtk_list_store_new(2, G_TYPE_INT, G_TYPE_STRING); for(i=0; i<count; i++) { if (display_data[i].id == -1) break; g...
false
false
false
false
false
0
iter_stack_push_new (AttachProcess *ap, GtkTreeStore *store) { GtkTreeIter *new_iter, *top_iter; new_iter = g_new (GtkTreeIter, 1); top_iter = (GtkTreeIter *) (g_slist_nth_data (ap->iter_stack, 0)); ap->iter_stack = g_slist_prepend (ap->iter_stack, (gpointer) (new_iter)); gtk_tree_store_append (store, new_iter,...
false
false
false
false
false
0
TCSP_CertifyKey_Internal(TCS_CONTEXT_HANDLE hContext, /* in */ TCS_KEY_HANDLE certHandle, /* in */ TCS_KEY_HANDLE keyHandle, /* in */ TCPA_NONCE antiReplay, /* in */ TPM_AUTH * certAuth, /* in, out */ TPM_AUTH * keyAuth, /* in, out */ UINT32 * CertifyInfoSize, /* out */ BYTE ** CertifyInfo, ...
false
false
false
false
false
0
_hb_buffer_add_output_glyphs_be16 (hb_buffer_t *buffer, unsigned int num_in, unsigned int num_out, const uint16_t *glyph_data_be, unsigned short component, unsigned short lig_id) { unsigned int i; unsigned int mask; unsigned int cluster; if (buffer->out_string != buffer->in_s...
false
false
false
false
false
0
WritePPM(FILE* fout, const WebPDecBuffer* const buffer, int alpha) { const uint32_t width = buffer->width; const uint32_t height = buffer->height; const uint8_t* const rgb = buffer->u.RGBA.rgba; const int stride = buffer->u.RGBA.stride; const size_t bytes_per_px = alpha ? 4 : 3; uint32_t y; if (alpha) { ...
false
false
false
false
false
0
_mesa_free_matrix_data( struct gl_context *ctx ) { GLint i; free_matrix_stack(&ctx->ModelviewMatrixStack); free_matrix_stack(&ctx->ProjectionMatrixStack); for (i = 0; i < Elements(ctx->TextureMatrixStack); i++) free_matrix_stack(&ctx->TextureMatrixStack[i]); for (i = 0; i < Elements(ctx->ProgramMa...
false
false
false
false
false
0
Ns_ConnDriverContext(Ns_Conn *conn) { Conn *connPtr = (Conn *) conn; return (void *)(connPtr->sockPtr ? connPtr->sockPtr->arg : NULL); }
false
false
false
false
false
0
alc_reboot_notify(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; if (spec && spec->reboot_notify) spec->reboot_notify(codec); else alc_shutup(codec); }
false
false
false
false
false
0
Java_ncsa_hdf_hdf5lib_H5_H5Ovisit (JNIEnv *env, jclass clss, jint grp_id, jint idx_type, jint order, jobject callback_op, jobject op_data) { herr_t status = -1; ENVPTR->GetJavaVM(ENVPAR &jvm); visit_callback = callback_op; if (op_data == NULL) { ...
false
false
false
false
false
0
rfftw_c2real_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work) { fftw_plan_node *p = plan->root; switch (p->type) { case FFTW_HC2REAL: { fftw_hc2real_codelet *codelet = p->nodeu.hc2real.cod...
false
false
false
false
false
0
qib_wait_linkstate(struct qib_pportdata *ppd, u32 state, int msecs) { int ret; unsigned long flags; spin_lock_irqsave(&ppd->lflags_lock, flags); if (ppd->state_wanted) { spin_unlock_irqrestore(&ppd->lflags_lock, flags); ret = -EBUSY; goto bail; } ppd->state_wanted = state; spin_unlock_irqrestore(&ppd->lfl...
false
false
false
false
false
0
elementLookNFeelStart(const XMLAttributes& attributes) { Scheme::LoadableUIElement lnf; lnf.filename = attributes.getValueAsString(FilenameAttribute); lnf.resourceGroup = attributes.getValueAsString(ResourceGroupAttribute); d_scheme->d_looknfeels.push_back(lnf); }
false
false
false
false
false
0
HandleEvent( const SDL_Event &event ) { if ( !mission ) { if ( event.type == SDL_KEYDOWN ) ShowContextMenu( Point(-1, -1) ); else if ( event.type == SDL_MOUSEBUTTONDOWN ) ShowContextMenu( Point(event.button.x - x, event.button.y - y) ); return GUI_OK; } GUI_Status rc = Window::HandleEve...
false
false
false
false
false
0
getfillchar(Datalist* fillsrc) { /* Determine the fill char */ int fillchar = 0; if(fillsrc != NULL && fillsrc->length > 0) { Constant* ccon = fillsrc->data; if(ccon->nctype == NC_CHAR) { fillchar = ccon->value.charv; } else if(ccon->nctype == NC_STRING) { if(ccon->value.stringv.len > 0) {...
false
false
false
false
false
0
nfs4_free_pages(struct page **pages, size_t size) { int i; if (!pages) return; for (i = 0; i < size; i++) { if (!pages[i]) break; __free_page(pages[i]); } kfree(pages); }
false
false
false
false
false
0
Free(void) { free(Tap); Tap=NULL; if(!ExternShape) { free(ShapeI); free(ShapeQ); } ShapeI=NULL; ShapeQ=NULL; Output.Free(); }
false
false
false
false
false
0
accept(const Syndication::DocumentSource& source) const { QDomElement root = source.asDomDocument().documentElement(); return !root.isNull() && (root.namespaceURI() == atom1Namespace() || root.namespaceURI() == atom0_3Namespace()); }
false
false
false
false
false
0
typeMess(t_symbol *type) { char*s=type->s_name; char c=*s; switch(c){ case 'd': // default m_drawType = GL_DEFAULT_GEM; break; case 'f': // fill m_drawType = GL_POLYGON; break; case 'p': // point m_drawType = GL_POINTS; break; case 'l': { // line, linestrip char c2=s[4];...
false
false
false
false
false
0
execute_tm_memopt (void) { struct tm_region *region; VEC (basic_block, heap) *bbs; tm_memopt_value_id = 0; tm_memopt_value_numbers = htab_create (10, tm_memop_hash, tm_memop_eq, free); for (region = all_tm_regions; region; region = region->next) { /* All the TM stores/loads in the current region. ...
false
false
false
false
false
0
chop_newline(char *s) /* Remove trailing \r,\n, etc. characters */ { char *t; for(t=s;*t!=0;t++); /* Find the end of the string */ for(;t>=s && (*t==0 || *t=='\r'|| *t=='\n');t--); *(t+1)=0; }
false
false
false
false
false
0
maybeLexIntegerType(Cursor C, MIToken &Token) { if (C.peek() != 'i' || !isdigit(C.peek(1))) return None; auto Range = C; C.advance(); // Skip 'i' while (isdigit(C.peek())) C.advance(); Token.reset(MIToken::IntegerType, Range.upto(C)); return C; }
false
false
false
false
false
0
gwy_graph_draw_selection_lines(GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraphLine *selection, GtkOrientation orientation) { gint i, n_of_lines; gdouble selection_linedata; GwySel...
false
false
false
false
false
0
gkd_secret_lock_all (GckSession *session, DBusError *derr) { GckBuilder builder = GCK_BUILDER_INIT; GError *error = NULL; GList *objects, *l; /* Lock all the main collections */ gck_builder_add_ulong (&builder, CKA_CLASS, CKO_G_CREDENTIAL); gck_builder_add_boolean (&builder, CKA_GNOME_TRANSI...
false
false
false
false
false
0
cz_enable_vce_dpm(struct amdgpu_device *adev, bool enable) { struct cz_power_info *pi = cz_get_pi(adev); int ret = 0; if (enable && pi->caps_vce_dpm) { pi->dpm_flags |= DPMFlags_VCE_Enabled; DRM_DEBUG("VCE DPM Enabled.\n"); ret = cz_send_msg_to_smc_with_parameter(adev, PPSMC_MSG_EnableAllSmuFeatures, VCE_...
false
false
false
false
false
0
safe_fread (void *buf, int count, FILE * fd) { if (fread (buf, count, 1, fd) != 1) { /* size_t = count, nmemb = 1 */ if (feof (fd)) gerr (ErrEof, _("EOF while attemping to read %d bytes"), count); else FLUID_LOG (FLUID_ERR, _("File read failed")); return (FAIL); } return (OK); }
false
false
false
false
false
0
IoRegexMatches_rawsetPosition_(IoRegexMatches *self, int position) { if (position < 0) position = 0; if (position > DATA(self)->endPosition) position = DATA(self)->endPosition; DATA(self)->position = position; DATA(self)->currentMatchIsEmpty = 0; return self; }
false
false
false
false
false
0
old_swap_nifti_header( struct nifti_1_header *h , int is_nifti ) { /* this stuff is always present, for ANALYZE and NIFTI */ swap_4(h->sizeof_hdr) ; nifti_swap_2bytes( 8 , h->dim ) ; nifti_swap_4bytes( 8 , h->pixdim ) ; swap_2(h->datatype) ; swap_2(h->bitpix) ; swap_4(h->vox_offset); swap_4(h->c...
false
false
false
false
false
0
_e_fm2_file_symlink(Evas_Object *obj) { E_Fm2_Smart_Data *sd; Eina_List *paths; const char *filepath; size_t length = 0; size_t size = 0; char *args = NULL; Eina_Bool memerr = EINA_FALSE; sd = evas_object_smart_data_get(obj); if (!sd) return; /* Convert URI list to a list of real path...
false
true
false
false
false
1
_sci_midi_process_state(base_song_iterator_t *self, unsigned char *buf, int *result, song_iterator_channel_t *channel, int flags) { CHECK_FOR_END(0); switch (channel->state) { case SI_STATE_PCM: { if (*(self->data + channel->offset) == 0 && *(self->data + channel->offset + 1) == SCI_MIDI_EOT) /* F...
false
false
false
false
true
1
gen_peephole2_322 (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands) { rtx operand0; rtx operand1; rtx operand2; rtx operand3; rtx operand4; rtx operand5; rtx _val = 0; HARD_REG_SET _regs_allocated; CLEAR_HARD_REG_SET (_regs_allocated); if ((operands[4] = peep2_find_free_register (0, 0, "r", SImode, &_...
false
false
false
false
false
0
bn_mon_exp(u8 *d, u8 *a, u8 *N, u32 n, u8 *e, u32 en) { u8 t[512]; u32 i; u8 mask; bn_zero(d, n); d[n-1] = 1; bn_to_mon(d, N, n); for (i = 0; i < en; i++) for (mask = 0x80; mask != 0; mask >>= 1) { bn_mon_mul(t, d, d, N, n); if ((e[i] & mask) != 0) bn_mon_mul(d, t, a, N, n); else bn_copy(d, ...
false
false
false
false
false
0
weightAdd(t_float*src, t_float*dest, const t_float weight, size_t len) { size_t i; for(i=0; i<len; i++) { *dest++ += weight* (*src++); } }
false
false
false
false
false
0
remove_key(dns_diff_t *diff, dns_dnsseckey_t *key, dns_name_t *origin, dns_ttl_t ttl, isc_mem_t *mctx, const char *reason, void (*report)(const char *, ...)) { isc_result_t result; dns_difftuple_t *tuple = NULL; unsigned char buf[DST_KEY_MAXSIZE]; dns_rdata_t dnskey = DNS_RDATA_INIT; char alg[80]; dns_seca...
false
false
false
false
false
0
parse(GooString *encodingNameA) { FILE *f; UnicodeMap *map; UnicodeMapRange *range; UnicodeMapExt *eMap; int size, eMapsSize; char buf[256]; int line, nBytes, i, x; char *tok1, *tok2, *tok3; char *tokptr; if (!(f = globalParams->getUnicodeMapFile(encodingNameA))) { error(-1, "Couldn't find unic...
false
false
false
false
false
0
IncrementRegister(int reg, RegExpNode* on_success) { ActionNode* result = new ActionNode(INCREMENT_REGISTER, on_success); result->data_.u_increment_register.reg = reg; return result; }
false
false
false
false
false
0
__pyx_pf_6Cython_8Compiler_8Scanning_16SourceDescriptor___str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__...
false
false
false
false
false
0
AddGlyphsToUnsortedList(std::vector<utf16> & vwGlyphs) { for (size_t iw = 0; iw < m_vwGlyphIDs.size(); iw++) { vwGlyphs.push_back(m_vwGlyphIDs[iw]); } }
false
false
false
false
false
0
sgen_check_section_scan_starts (GCMemSection *section) { int i; for (i = 0; i < section->num_scan_start; ++i) { if (section->scan_starts [i]) { guint size = safe_object_get_size ((MonoObject*) section->scan_starts [i]); g_assert (size >= sizeof (MonoObject) && size <= MAX_SMALL_OBJ_SIZE); } } }
false
false
false
false
false
0
writeArrayArrayIntProperty(const char *p, const IntegerMatrix &m) { stringstream t; if(isXml) { t << "<m>\n"; for(int i=0;i<m.getHeight();i++) { t << "<v>"; for(int j=0;j<m.getWidth();j++) { if(j!=0)t<<" "; t<<m[i][j]; ...
false
false
false
false
false
0
startDeath() { deathExplosions(); if(lives < 0) { fireGun(false); game->heroDeath = DEATH_TIME; game->gameMode = Global::HeroDead; dontShow = -1; } else { superBomb = 1; reset(); dontShow = 130; } }
false
false
false
false
false
0
ExecBitmapHeapReScan(BitmapHeapScanState *node, ExprContext *exprCtxt) { EState *estate; Index scanrelid; estate = node->ss.ps.state; scanrelid = ((BitmapHeapScan *) node->ss.ps.plan)->scan.scanrelid; node->ss.ps.ps_TupFromTlist = false; /* * If we are being passed an outer tuple, link it into the "regul...
false
false
false
false
false
0
gen_vec_shr_v2di (rtx operand0, rtx operand1, rtx operand2) { rtx _val = 0; start_sequence (); { rtx operands[3]; operands[0] = operand0; operands[1] = operand1; operands[2] = operand2; #line 1027 "../../src/gcc/config/rs6000/vector.md" { rtx bitshift = operands[2]; rtx shift; rtx insn; ...
false
false
false
false
false
0
mtdoops_init(void) { struct mtdoops_context *cxt = &oops_cxt; int mtd_index; char *endp; if (strlen(mtddev) == 0) { printk(KERN_ERR "mtdoops: mtd device (mtddev=name/number) must be supplied\n"); return -EINVAL; } if ((record_size & 4095) != 0) { printk(KERN_ERR "mtdoops: record_size must be a multiple of ...
false
false
false
false
false
0
fileio_readall(fileio *self) { PyObject *result; Py_ssize_t total = 0; Py_ssize_t n; if (self->fd < 0) return err_closed(); if (!_PyVerify_fd(self->fd)) return PyErr_SetFromErrno(PyExc_IOError); result = PyBytes_FromStringAndSize(NULL, SMALLCHUNK); if (result == NULL) ...
false
false
false
false
false
0
fromUTF8(const Ice::Byte* sourceStart, const Ice::Byte* sourceEnd, string& target) const { size_t size = static_cast<size_t>(sourceEnd - sourceStart); target.resize(size); unsigned int j = size; for(unsigned int i = 0; i < size; ++i) { target[i] = sourceStart[--j]; } }
false
false
false
false
false
0
get_string_or_null_from_copy_binary(const char **bufp, int *residualp) { int32_t len; char *p; COPY_INT32(len, *bufp, *residualp, "metdb_pgsql: copy varchar"); if (len == -1) /* NULL field */ return (NULL); if (len < 0) /* We don't allow that long varchar */ gflog_fatal(GFARM_MSG_1000430, "metadb_pgsql:...
false
false
false
false
false
0
mark_stwires(struct mod_t *mdp, struct expr_t *lhsx) { struct net_t *np; switch ((byte) lhsx->optyp) { /* if global has driven strength - all instances of wire must be */ /* strength */ case GLBREF: case ID: np = lhsx->lu.sy->el.enp; break; case LSB: case PARTSEL: /* this is bit select or array in...
false
false
false
false
false
0
i40evf_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key, const u8 hfunc) { struct i40evf_adapter *adapter = netdev_priv(netdev); struct i40e_vsi *vsi = &adapter->vsi; u8 *seed = NULL; u16 i; /* We do not allow change in unsupported parameters */ if (key || (hfunc != ETH_RSS_HASH_NO_...
false
false
false
false
false
0
ec_GFp_simple_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx) { BN_CTX *new_ctx = NULL; int ret = 0; if (ctx == NULL) { ctx = new_ctx = BN_CTX_new(); if (ctx == NULL) return 0; } if (x != NULL) { if (!BN_nnmo...
false
false
false
false
false
0
ttfFont__destroy(ttfFont *self, gs_font_dir *dir) { gs_memory_t *mem = dir->memory->stable_memory; ttfFont__finit(self); gs_free_object(mem, self, "ttfFont__destroy"); ttfInterpreter__release(&dir->tti); gx_san__release(&dir->san); if (dir->tti == NULL && dir->ttm != NULL) { gs_free_obj...
false
false
false
false
false
0
mime_server_write(struct soap *soap, void *handle, const char *buf, size_t len) { FILE *fd = ((struct mime_server_handle*)handle)->fd; while (len) { size_t nwritten = fwrite(buf, 1, len, fd); if (!nwritten) { soap->errnum = errno; return SOAP_EOF; } len -= nwritten; buf += nwritten; } ...
false
false
false
false
true
1
DecompressG726(uint8_t *p,int Len) { int AudioSamples = Len * 2; NetAudio *pAudio = NULL; if(AudioSamples > 0) { pAudio = VoipNode::AllocAudioBuf(AudioSamples * sizeof(int16)); if(pAudio == NULL) { LOG_ERROR(("%s: AllocAudioBuf failed.\n",__FUNCTION__)); } else { pAud...
false
false
false
false
false
0
pci_esp_dma_drain(struct esp *esp) { u8 resid; int lim = 1000; if ((esp->sreg & ESP_STAT_PMASK) == ESP_DOP || (esp->sreg & ESP_STAT_PMASK) == ESP_DIP) /* Data-In or Data-Out, nothing to be done */ return; while (--lim > 0) { resid = pci_esp_read8(esp, ESP_FFLAGS) & ESP_FF_FBYTES; if (resid <= 1) ...
false
false
false
false
false
0
some_user_flags_defined(MAILSTREAM *stream) { int k; if(stream) for(k = 0; k < NUSERFLAGS; k++) if(stream_to_user_flag_name(stream, k)) return 1; return 0; }
false
false
false
false
false
0
lvdisplay_colons(const struct logical_volume *lv) { int inkernel; struct lvinfo info; inkernel = lv_info(lv->vg->cmd, lv, 0, &info, 1, 0) && info.exists; log_print("%s%s/%s:%s:%" PRIu64 ":%d:-1:%d:%" PRIu64 ":%d:-1:%d:%d:%d:%d", lv->vg->cmd->dev_dir, lv->vg->name, lv->name, lv->vg->name, ((lv->...
false
false
false
false
false
0
printchex(char *in, uint32 len, bool spaces=true) { unsigned int i; printf("["); if(spaces) for(i=0;i<len;i++)printf("%x ",(unsigned char)in[i]); else for(i=0;i<len;i++)printf("%x",(unsigned char)in[i]); printf("]\n"); }
false
false
false
false
false
0
editFile(const char *fname, int lineno) { const char *editorName; const char *editor_lineno_arg = NULL; char *sys; int result; psql_assert(fname); /* Find an editor to use */ editorName = getenv("PSQL_EDITOR"); if (!editorName) editorName = getenv("EDITOR"); if (!editorName) editorName = getenv("VIS...
false
false
false
false
false
0
e_gadcon_edit_begin(E_Gadcon *gc) { Eina_List *l; E_Gadcon_Client *gcc; E_OBJECT_CHECK(gc); E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE); e_gadcon_layout_freeze(gc->o_container); e_gadcon_locked_set(gc, 1); gc->editing = 1; EINA_LIST_FOREACH(gc->clients, l, gcc) e_gadcon_client_edit_begin(gcc); ...
false
false
false
false
false
0
dell_get_intensity(struct backlight_device *bd) { int token; int ret; token = find_token_location(BRIGHTNESS_TOKEN); if (token == -1) return -ENODEV; get_buffer(); buffer->input[0] = token; if (power_supply_is_system_supplied() > 0) dell_send_request(buffer, 0, 2); else dell_send_request(buffer, 0, 1);...
false
false
false
false
false
0
clocks_stopwatch_frame_update (ClocksStopwatchFrame* self, gint s, gdouble ms) { gint _tmp0_ = 0; gdouble _tmp1_ = 0.0; g_return_if_fail (self != NULL); _tmp0_ = s; self->priv->seconds = _tmp0_; _tmp1_ = ms; self->priv->millisecs = _tmp1_; }
false
false
false
false
false
0
init() { // need an occasional full neighbor list int irequest = neighbor->request((void *) this); neighbor->requests[irequest]->pair = 0; neighbor->requests[irequest]->compute = 1; neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; neighbor->requests[irequest]->occasional = ...
false
false
false
false
false
0
test_refs_iterator__list(void) { git_reference_iterator *iter; git_vector output; git_reference *ref; cl_git_pass(git_vector_init(&output, 32, &refcmp_cb)); cl_git_pass(git_reference_iterator_new(&iter, repo)); while (1) { int error = git_reference_next(&ref, iter); if (error == GIT_ITEROVER) break; cl...
false
false
false
false
false
0