diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-11-05 18:00:10 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-11-05 18:00:10 +0100 |
commit | 5c1feb0ef0b795e5de71e956f9ccddcd5c4b7f21 (patch) | |
tree | ce10dae7b7edc23f0a69fecaae8b3ed62e2a39eb /sys/src/9/port | |
parent | bf9bada0c246ef96ee168e355b26e4dc67396ee4 (diff) |
libc: move calloc() into its own compilation unit
move calloc() in its own compilation unit to avoid
code duplication. also, calloc() is used rarely in
plan9 programs.
Diffstat (limited to 'sys/src/9/port')
-rw-r--r-- | sys/src/9/port/alloc.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/src/9/port/alloc.c b/sys/src/9/port/alloc.c index 963d60fd2..6c3519fdf 100644 --- a/sys/src/9/port/alloc.c +++ b/sys/src/9/port/alloc.c @@ -286,15 +286,6 @@ msize(void *v) return poolmsize(mainmem, (ulong*)v-Npadlong)-Npadlong*sizeof(ulong); } -void* -calloc(ulong n, ulong szelem) -{ - void *v; - if(v = mallocz(n*szelem, 1)) - setmalloctag(v, getcallerpc(&n)); - return v; -} - /* secret memory, used to back cryptographic keys and cipher states */ void* secalloc(ulong size) |