Lines Matching refs:sizeof

118 -	if ((ml = CAST(struct mlist *, malloc(sizeof(*ml)))) == NULL)
119 + if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL)
150 sizeof(struct magic_set)))) == NULL)
155 len = (ms->c.len = 10) * sizeof(*ms->c.li);
219 - if ((mlist = CAST(struct mlist *, calloc(1, sizeof(*mlist)))) == NULL) {
220 + if ((mlist = CAST(struct mlist *, ecalloc(1, sizeof(*mlist)))) == NULL) {
257 - file_oomem(ms, sizeof(*ms->mlist[i]));
269 - file_oomem(ms, sizeof(*ml));
304 + file_oomem(ms, sizeof(*ms->mlist[i]));
337 - realloc(mset[i].me, sizeof(*mp) * mset[i].max))) ==
338 + erealloc(mset[i].me, sizeof(*mp) * mset[i].max))) ==
340 file_oomem(ms, sizeof(*mp) * mset[i].max);
368 memset(&me, 0, sizeof(me));
399 slen = sizeof(**ma) * mentrycount;
432 memset(mset, 0, sizeof(mset));
436 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL)
437 + if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL)
439 file_oomem(ms, sizeof(*map));
463 + if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d.d_name)) < 0) {
481 mlen = maxfiles * sizeof(*filearr);
496 + filearr[files++] = estrndup(mfn, (mflen > sizeof(mfn) - 1)? sizeof(mfn) - 1: mflen);
501 qsort(filearr, files, sizeof(*filearr), cmpstrp);
536 sizeof(*nm) * cnt))) == NULL) {
537 file_oomem(ms, sizeof(*nm) * cnt);
540 static const size_t len = sizeof(*m) * ALLOC_CHUNK;
623 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
624 - file_oomem(ms, sizeof(*map));
659 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
660 + if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) {
661 file_oomem(ms, sizeof(*map));
788 - entries = CAST(uint32_t, map->len / sizeof(struct magic));
789 - if ((entries * sizeof(struct magic)) != map->len) {
792 - dbname, map->len, sizeof(struct magic));
799 + map->p = emalloc(sizeof(php_magic_database));
800 + map->p = memcpy(map->p, php_magic_database, sizeof(php_magic_database));
804 + nentries = (uint32_t)(st.sb.st_size / sizeof(struct magic));
805 + entries = (uint32_t)(st.sb.st_size / sizeof(struct magic));
806 + if ((zend_off_t)(entries * sizeof(struct magic)) != st.sb.st_size) {
809 + sizeof(struct magic));
850 static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS;
851 static const size_t m = sizeof(**map->magic);
880 - if (write(fd, &hdr, sizeof(hdr)) != CAST(ssize_t, sizeof(hdr))) {
881 + if (php_stream_write(stream,(const char *)&hdr, sizeof(hdr)) != (ssize_t)sizeof(hdr)) {
1009 memcpy(&b->st, st, sizeof(b->st));
1012 memset(&b->st, 0, sizeof(b->st));
1158 - if (cdf_read(info, CAST(off_t, 0), buf, sizeof(buf)) == -1)
1159 + if (cdf_read(info, CAST(zend_off_t, 0), buf, sizeof(buf)) == -1)
1509 mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
1516 mlen = (nbytes + 1) * sizeof(nbuf[0]);
2064 - (void)strlcpy(buf2, fn, sizeof buf2);
2067 - (void)strlcat(buf2, buf, sizeof buf2);
2253 len = (ms->c.len = 20 + level) * sizeof(*ms->c.li);
2339 - memset(pmatch, 0, nmatch * sizeof(*pmatch));
2365 - (void)regerror(rc, &rx->rx, errmsg, sizeof(errmsg));
2377 - if ((pb = (CAST(file_pushbuf_t *, malloc(sizeof(*pb))))) == NULL)
2378 + if ((pb = (CAST(file_pushbuf_t *, emalloc(sizeof(*pb))))) == NULL)
2521 - dllpath = calloc(MAX_PATH + 1, sizeof(*dllpath));
2696 - (void)memset(utsbuf, 0, sizeof(utsbuf));
2704 - (void)memset(&utbuf, 0, sizeof(utbuf));
2759 #define SLOP (1 + sizeof(union VALUETYPE))
2826 + memcpy(&sb, &ssb.sb, sizeof(zend_stat_t));
3054 + memset(&ts, 0, sizeof(ts));
3259 + pattern = zend_string_init("~%[-0-9\\.]*s~", sizeof("~%[-0-9\\.]*s~") - 1, 0);
3280 len = c->len * sizeof(*c->li);
3395 slen = MIN(m->vallen, sizeof(m->value.s));