Lines Matching refs:sizeof

38 -	if ((ml = CAST(struct mlist *, malloc(sizeof(*ml)))) == NULL)
39 + if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL)
47 - calloc(ml->nmagic, sizeof(*ml->magic_rxcomp)));
88 sizeof(*ms)))) == NULL)
93 len = (ms->c.len = 10) * sizeof(*ms->c.li);
158 - if ((mlist = CAST(struct mlist *, calloc(1, sizeof(*mlist)))) == NULL) {
159 + if ((mlist = CAST(struct mlist *, ecalloc(1, sizeof(*mlist)))) == NULL) {
209 - file_oomem(ms, sizeof(*ms->mlist[0]));
221 - file_oomem(ms, sizeof(*ms->mlist[0]));
256 + file_oomem(ms, sizeof(*ms->mlist[i]));
289 - realloc(mset[i].me, sizeof(*mp) * incr))) ==
290 + erealloc(mset[i].me, sizeof(*mp) * incr))) ==
292 file_oomem(ms, sizeof(*mp) * incr);
320 memset(&me, 0, sizeof(me));
342 slen = sizeof(**ma) * mentrycount;
375 memset(mset, 0, sizeof(mset));
379 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL)
380 + if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL)
382 file_oomem(ms, sizeof(*map));
406 + if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d.d_name)) < 0) {
424 mlen = maxfiles * sizeof(*filearr);
439 + filearr[files++] = estrndup(mfn, (mflen > sizeof(mfn) - 1)? sizeof(mfn) - 1: mflen);
444 qsort(filearr, files, sizeof(*filearr), cmpstrp);
470 sizeof(*nm) * cnt))) == NULL) {
471 file_oomem(ms, sizeof(*nm) * cnt);
474 static const size_t len = sizeof(*m) * ALLOC_CHUNK;
546 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
547 - file_oomem(ms, sizeof(*map));
582 - if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
583 + if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) {
584 file_oomem(ms, sizeof(*map));
711 - entries = CAST(uint32_t, map->len / sizeof(struct magic));
712 - if ((entries * sizeof(struct magic)) != map->len) {
715 - dbname, map->len, sizeof(struct magic));
722 + map->p = emalloc(sizeof(php_magic_database));
723 + map->p = memcpy(map->p, php_magic_database, sizeof(php_magic_database));
727 + nentries = (uint32_t)(st.sb.st_size / sizeof(struct magic));
728 + entries = (uint32_t)(st.sb.st_size / sizeof(struct magic));
729 + if ((zend_off_t)(entries * sizeof(struct magic)) != st.sb.st_size) {
732 + sizeof(struct magic));
773 static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS;
774 static const size_t m = sizeof(**map->magic);
797 - if (write(fd, &hdr, sizeof(hdr)) != CAST(ssize_t, sizeof(hdr))) {
798 + if (php_stream_write(stream,(const char *)&hdr, sizeof(hdr)) != (ssize_t)sizeof(hdr)) {
934 memcpy(&b->st, st, sizeof(b->st));
937 memset(&b->st, 0, sizeof(b->st));
1084 - if (cdf_read(info, CAST(off_t, 0), buf, sizeof(buf)) == -1)
1085 + if (cdf_read(info, CAST(zend_off_t, 0), buf, sizeof(buf)) == -1)
1353 mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
1362 mlen = (nbytes + 1) * sizeof(nbuf[0]);
1435 + CAST(time_t, sizeof(time_t) > 4 ? 0x3afff487cfULL : 0x7fffffffULL)
1843 - (void)strlcpy(buf2, fn, sizeof buf2);
1846 - (void)strlcat(buf2, buf, sizeof buf2);
2018 len = (ms->c.len = 20 + level) * sizeof(*ms->c.li);
2092 - file_printable(ms, sbuf, sizeof(sbuf), pat, len));
2102 - c, file_printable(ms, sbuf, sizeof(sbuf), pat, len));
2121 - strlcpy(old, setlocale(LC_CTYPE, NULL), sizeof(old));
2135 - (void)regerror(rc, rx, errmsg, sizeof(errmsg));
2137 - file_printable(ms, buf, sizeof(buf), pat, strlen(pat)),
2153 - strlcpy(old, setlocale(LC_CTYPE, NULL), sizeof(old));
2159 - memset(pmatch, 0, nmatch * sizeof(*pmatch));
2182 - if ((pb = (CAST(file_pushbuf_t *, malloc(sizeof(*pb))))) == NULL)
2183 + if ((pb = (CAST(file_pushbuf_t *, emalloc(sizeof(*pb))))) == NULL)
2317 - dllpath = calloc(MAX_PATH + 1, sizeof(*dllpath));
2498 - (void)memset(utsbuf, 0, sizeof(utsbuf));
2506 - (void)memset(&utbuf, 0, sizeof(utbuf));
2561 #define SLOP (1 + sizeof(union VALUETYPE))
2626 + memcpy(&sb, &ssb.sb, sizeof(zend_stat_t));
2885 + memset(&ts, 0, sizeof(ts));
3086 sbuf, sizeof(sbuf), scp, ms->search.rm_len));
3095 len = c->len * sizeof(*c->li);
3172 - file_regex_t *rx = CAST(file_regex_t *, malloc(sizeof(*rx)));
3176 - "u bytes", sizeof(*rx));
3196 slen = MIN(m->vallen, sizeof(m->value.s));