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));
390 slen = sizeof(**ma) * mentrycount;
423 memset(mset, 0, sizeof(mset));
427 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL)
428 + if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL)
430 file_oomem(ms, sizeof(*map));
454 + if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d.d_name)) < 0) {
472 mlen = maxfiles * sizeof(*filearr);
487 + filearr[files++] = estrndup(mfn, (mflen > sizeof(mfn) - 1)? sizeof(mfn) - 1: mflen);
492 qsort(filearr, files, sizeof(*filearr), cmpstrp);
518 sizeof(*nm) * cnt))) == NULL) {
519 file_oomem(ms, sizeof(*nm) * cnt);
522 static const size_t len = sizeof(*m) * ALLOC_CHUNK;
605 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
606 - file_oomem(ms, sizeof(*map));
641 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
642 + if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) {
643 file_oomem(ms, sizeof(*map));
770 - entries = CAST(uint32_t, map->len / sizeof(struct magic));
771 - if ((entries * sizeof(struct magic)) != map->len) {
774 - dbname, map->len, sizeof(struct magic));
781 + map->p = emalloc(sizeof(php_magic_database));
782 + map->p = memcpy(map->p, php_magic_database, sizeof(php_magic_database));
786 + nentries = (uint32_t)(st.sb.st_size / sizeof(struct magic));
787 + entries = (uint32_t)(st.sb.st_size / sizeof(struct magic));
788 + if ((zend_off_t)(entries * sizeof(struct magic)) != st.sb.st_size) {
791 + sizeof(struct magic));
832 static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS;
833 static const size_t m = sizeof(**map->magic);
862 - if (write(fd, &hdr, sizeof(hdr)) != CAST(ssize_t, sizeof(hdr))) {
863 + if (php_stream_write(stream,(const char *)&hdr, sizeof(hdr)) != (ssize_t)sizeof(hdr)) {
982 memcpy(&b->st, st, sizeof(b->st));
985 memset(&b->st, 0, sizeof(b->st));
1131 - if (cdf_read(info, CAST(off_t, 0), buf, sizeof(buf)) == -1)
1132 + if (cdf_read(info, CAST(zend_off_t, 0), buf, sizeof(buf)) == -1)
1482 mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
1489 mlen = (nbytes + 1) * sizeof(nbuf[0]);
2037 - (void)strlcpy(buf2, fn, sizeof buf2);
2040 - (void)strlcat(buf2, buf, sizeof buf2);
2226 len = (ms->c.len = 20 + level) * sizeof(*ms->c.li);
2312 - memset(pmatch, 0, nmatch * sizeof(*pmatch));
2338 - (void)regerror(rc, &rx->rx, errmsg, sizeof(errmsg));
2350 - if ((pb = (CAST(file_pushbuf_t *, malloc(sizeof(*pb))))) == NULL)
2351 + if ((pb = (CAST(file_pushbuf_t *, emalloc(sizeof(*pb))))) == NULL)
2494 - dllpath = calloc(MAX_PATH + 1, sizeof(*dllpath));
2669 - (void)memset(utsbuf, 0, sizeof(utsbuf));
2677 - (void)memset(&utbuf, 0, sizeof(utbuf));
2732 #define SLOP (1 + sizeof(union VALUETYPE))
2799 + memcpy(&sb, &ssb.sb, sizeof(zend_stat_t));
3027 + memset(&ts, 0, sizeof(ts));
3232 + pattern = zend_string_init("~%[-0-9\\.]*s~", sizeof("~%[-0-9\\.]*s~") - 1, 0);
3253 len = c->len * sizeof(*c->li);