/freebsd-9.3-release/crypto/openssh/ |
H A D | xmalloc.c | 41 xcalloc(size_t nmemb, size_t size) argument 45 if (size == 0 || nmemb == 0) 47 if (SIZE_T_MAX / nmemb < size) 48 fatal("xcalloc: nmemb * size > SIZE_T_MAX"); 49 ptr = calloc(nmemb, size); 52 size * nmemb); 57 xrealloc(void *ptr, size_t nmemb, size_t size) argument 60 size_t new_size = nmemb * size; 64 if (SIZE_T_MAX / nmemb < size) 65 fatal("xrealloc: nmemb * siz [all...] |
/freebsd-9.3-release/sbin/rcorder/ |
H A D | ealloc.h | 7 void *ecalloc(size_t nmemb, size_t size);
|
H A D | ealloc.c | 111 ecalloc(size_t nmemb, size_t size) argument 115 if ((ptr = calloc(nmemb, size)) == NULL)
|
/freebsd-9.3-release/contrib/nvi/clib/ |
H A D | bsearch.c | 67 bsearch(key, base0, nmemb, size, compar) 70 size_t nmemb; 79 for (lim = nmemb; lim != 0; lim >>= 1) {
|
/freebsd-9.3-release/lib/libc/stdlib/ |
H A D | bsearch.c | 56 bsearch(key, base0, nmemb, size, compar) 59 size_t nmemb; 68 for (lim = nmemb; lim != 0; lim >>= 1) {
|
H A D | heapsort.c | 73 * There two cases. If j == nmemb, select largest of Ki and Kj. If 74 * j < nmemb, select largest of Ki, Kj and Kj+1. 76 #define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \ 77 for (par_i = initval; (child_i = par_i * 2) <= nmemb; \ 80 if (child_i < nmemb && compar(child, child + size) < 0) { \ 108 #define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) { \ 109 for (par_i = 1; (child_i = par_i * 2) <= nmemb; par_i = child_i) { \ 111 if (child_i < nmemb && compar(child, child + size) < 0) { \ 139 heapsort(vbase, nmemb, size, compar) 141 size_t nmemb, siz [all...] |
H A D | merge.c | 98 mergesort(base, nmemb, size, cmp) 100 size_t nmemb; 115 if (nmemb == 0) 126 if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) 130 setup(list1, list2, nmemb, size, cmp); 131 last = list2 + nmemb * size; 226 last = list2 + nmemb*size; 229 memmove(list2, list1, nmemb*size);
|
/freebsd-9.3-release/sys/libkern/ |
H A D | bsearch.c | 56 bsearch(key, base0, nmemb, size, compar) 59 size_t nmemb; 68 for (lim = nmemb; lim != 0; lim >>= 1) {
|
/freebsd-9.3-release/tools/regression/lib/libc/stdlib/ |
H A D | test-sort.h | 49 ssort(int v[], int nmemb) argument 53 for (i = 0; i < nmemb; i++) { 54 for (j = i + 1; j < nmemb; j++) {
|
/freebsd-9.3-release/contrib/binutils/libiberty/ |
H A D | bsearch.c | 33 @deftypefn Supplemental void* bsearch (const void *@var{key}, const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, int (*@var{compar})(const void *, const void *)) 35 Performs a search over an array of @var{nmemb} elements pointed to by 71 size_t nmemb, register size_t size, 78 for (lim = nmemb; lim != 0; lim >>= 1) { 70 bsearch(register const void *key, const void *base0, size_t nmemb, register size_t size, register int (*compar)(const void *, const void *)) argument
|
/freebsd-9.3-release/contrib/gcclibs/libiberty/ |
H A D | bsearch.c | 33 @deftypefn Supplemental void* bsearch (const void *@var{key}, const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, int (*@var{compar})(const void *, const void *)) 35 Performs a search over an array of @var{nmemb} elements pointed to by 71 size_t nmemb, register size_t size, 78 for (lim = nmemb; lim != 0; lim >>= 1) { 70 bsearch(register const void *key, const void *base0, size_t nmemb, register size_t size, register int (*compar)(const void *, const void *)) argument
|
/freebsd-9.3-release/contrib/ntp/sntp/libpkgver/ |
H A D | colcomp.c | 102 size_t nmemb = 0; local 114 nmemb = sizeof ca / size; 116 printf("argc is <%d>, nmemb = <%d>\n", argc, nmemb); 120 for (i = 0; i < nmemb; ++i) { 124 qsort((void *)base, nmemb, size, qcmp); 128 for (i = 0; i < nmemb; ++i) {
|
/freebsd-9.3-release/contrib/ntp/libntp/ |
H A D | emalloc.c | 88 size_t nmemb, 97 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 98 nmemb > 0 && SIZE_MAX / nmemb < size) { 109 return ereallocz(optr, (size * nmemb), 0, FALSE); 111 return ereallocz(optr, (size * nmemb), 0, FALSE, file, line); 86 oreallocarray( void *optr, size_t nmemb, size_t size , const char * file, int line ) argument
|
/freebsd-9.3-release/usr.bin/grep/regex/ |
H A D | xmalloc.h | 15 void *xcalloc_impl(size_t nmemb, size_t size, const char *file, int line, 50 #define xcalloc(nmemb, size) xcalloc_impl(nmemb, size, __FILE__, __LINE__, \ 70 #define xcalloc(nmemb, size) calloc(nmemb, size)
|
/freebsd-9.3-release/contrib/ntp/lib/isc/unix/ |
H A D | stdio.c | 64 isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, size_t *nret) { argument 69 r = fread(ptr, size, nmemb, f); 70 if (r != nmemb) { 82 isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f, argument 89 r = fwrite(ptr, size, nmemb, f); 90 if (r != nmemb)
|
/freebsd-9.3-release/contrib/ntp/lib/isc/win32/ |
H A D | stdio.c | 63 isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, size_t *nret) { argument 68 r = fread(ptr, size, nmemb, f); 69 if (r != nmemb) { 81 isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f, argument 88 r = fwrite(ptr, size, nmemb, f); 89 if (r != nmemb)
|
/freebsd-9.3-release/contrib/bind9/lib/isc/unix/ |
H A D | stdio.c | 79 isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, size_t *nret) { argument 84 r = fread(ptr, size, nmemb, f); 85 if (r != nmemb) { 97 isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f, argument 104 r = fwrite(ptr, size, nmemb, f); 105 if (r != nmemb)
|
/freebsd-9.3-release/bin/sh/bltin/ |
H A D | bltin.h | 59 #define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file)
|
/freebsd-9.3-release/contrib/bind9/lib/isc/include/isc/ |
H A D | stdio.h | 59 isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, 64 isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f,
|
/freebsd-9.3-release/contrib/ntp/lib/isc/include/isc/ |
H A D | stdio.h | 55 isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, 60 isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f,
|
/freebsd-9.3-release/crypto/openssh/openbsd-compat/ |
H A D | bsd-poll.c | 48 size_t nmemb; local 60 nmemb = howmany(maxfd + 1 , NFDBITS); 61 if ((readfds = calloc(nmemb, sizeof(fd_mask))) == NULL || 62 (writefds = calloc(nmemb, sizeof(fd_mask))) == NULL || 63 (exceptfds = calloc(nmemb, sizeof(fd_mask))) == NULL) {
|
/freebsd-9.3-release/contrib/nvi/common/ |
H A D | mem.h | 118 #define CALLOC(sp, p, cast, nmemb, size) { \ 119 if ((p = (cast)calloc(nmemb, size)) == NULL) \ 122 #define CALLOC_GOTO(sp, p, cast, nmemb, size) { \ 123 if ((p = (cast)calloc(nmemb, size)) == NULL) \ 126 #define CALLOC_NOMSG(sp, p, cast, nmemb, size) { \ 127 p = (cast)calloc(nmemb, size); \ 129 #define CALLOC_RET(sp, p, cast, nmemb, size) { \ 130 if ((p = (cast)calloc(nmemb, size)) == NULL) { \
|
/freebsd-9.3-release/contrib/binutils/bfd/ |
H A D | libbfd.c | 180 /* Allocate memory using malloc, nmemb * size with overflow checking. */ 183 bfd_malloc2 (bfd_size_type nmemb, bfd_size_type size) 187 if ((nmemb | size) >= HALF_BFD_SIZE_TYPE 189 && nmemb > ~(bfd_size_type) 0 / size) 195 size *= nmemb; 234 /* Reallocate memory using realloc, nmemb * size with overflow checking. */ 237 bfd_realloc2 (void *ptr, bfd_size_type nmemb, bfd_size_type size) 241 if ((nmemb | size) >= HALF_BFD_SIZE_TYPE 243 && nmemb > ~(bfd_size_type) 0 / size) 249 size *= nmemb; 182 bfd_malloc2(bfd_size_type nmemb, bfd_size_type size) argument 236 bfd_realloc2(void *ptr, bfd_size_type nmemb, bfd_size_type size) argument 297 bfd_zmalloc2(bfd_size_type nmemb, bfd_size_type size) argument [all...] |
/freebsd-9.3-release/contrib/xz/src/liblzma/api/lzma/ |
H A D | base.h | 350 * \param nmemb Number of elements like in calloc(). liblzma 351 * will always set nmemb to 1, so it is safe to 352 * ignore nmemb in a custom allocator if you like. 353 * The nmemb argument exists only for 376 void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
|
/freebsd-9.3-release/usr.bin/xlint/llib/ |
H A D | llib-lstdc | 170 size_t (fread)(void *ptr, size_t size, size_t nmemb, FILE *stream); 171 size_t (fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *stream); 193 void *(calloc)(size_t nmemb, size_t size); 202 void *(bsearch)(const void *key, const void *base, size_t nmemb, 204 void (qsort)(void *base, size_t nmemb, size_t size,
|