Home
last modified time | relevance | path

Searched refs:newsize (Results 1 – 2 of 2) sorted by relevance

/bionic/libc/upstream-openbsd/lib/libc/stdlib/
Drecallocarray.c33 size_t oldsize, newsize; in recallocarray() local
44 newsize = newnmemb * size; in recallocarray()
57 if (newsize <= oldsize) { in recallocarray()
58 size_t d = oldsize - newsize; in recallocarray()
61 memset((char *)ptr + newsize, 0, d); in recallocarray()
66 newptr = malloc(newsize); in recallocarray()
70 if (newsize > oldsize) { in recallocarray()
72 memset((char *)newptr + oldsize, 0, newsize - oldsize); in recallocarray()
74 memcpy(newptr, ptr, newsize); in recallocarray()
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dfgetln.c43 __slbexpand(FILE *fp, size_t newsize) in __slbexpand() argument
47 if (fp->_lb._size >= newsize) in __slbexpand()
49 if ((p = recallocarray(fp->_lb._base, fp->_lb._size, newsize, 1)) == NULL) in __slbexpand()
52 fp->_lb._size = newsize; in __slbexpand()