diff options
author | 2018-09-18 02:29:10 +0000 | |
---|---|---|
committer | 2018-09-18 02:29:10 +0000 | |
commit | fb86b9ff865c612b838dd1fbc0cc62591021b191 (patch) | |
tree | ed70f168caa01d2b2c7020e4ac42d490dacbe111 | |
parent | fix order of arguments in fmt.Printf() (diff) | |
download | wireguard-openbsd-fb86b9ff865c612b838dd1fbc0cc62591021b191.tar.xz wireguard-openbsd-fb86b9ff865c612b838dd1fbc0cc62591021b191.zip |
remove macros for xmalloc(), xcalloc() & xreallocarray() and just name the
functions that.
ok millert@ martijn@
-rw-r--r-- | bin/csh/alloc.c | 8 | ||||
-rw-r--r-- | bin/csh/csh.h | 6 | ||||
-rw-r--r-- | bin/csh/extern.h | 8 |
3 files changed, 9 insertions, 13 deletions
diff --git a/bin/csh/alloc.c b/bin/csh/alloc.c index 9fec5a43b7f..c5d33636223 100644 --- a/bin/csh/alloc.c +++ b/bin/csh/alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc.c,v 1.17 2015/12/26 13:48:38 mestre Exp $ */ +/* $OpenBSD: alloc.c,v 1.18 2018/09/18 02:29:10 miko Exp $ */ /* $NetBSD: alloc.c,v 1.6 1995/03/21 09:02:23 cgd Exp $ */ /*- @@ -39,7 +39,7 @@ #include "extern.h" void * -Malloc(size_t n) +xmalloc(size_t n) { void *ptr; @@ -51,7 +51,7 @@ Malloc(size_t n) } void * -Reallocarray(void * p, size_t c, size_t n) +xreallocarray(void * p, size_t c, size_t n) { void *ptr; @@ -63,7 +63,7 @@ Reallocarray(void * p, size_t c, size_t n) } void * -Calloc(size_t s, size_t n) +xcalloc(size_t s, size_t n) { void *ptr; diff --git a/bin/csh/csh.h b/bin/csh/csh.h index b830d810681..974db3e267a 100644 --- a/bin/csh/csh.h +++ b/bin/csh/csh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: csh.h,v 1.30 2017/08/30 06:42:21 anton Exp $ */ +/* $OpenBSD: csh.h,v 1.31 2018/09/18 02:29:10 miko Exp $ */ /* $NetBSD: csh.h,v 1.9 1995/03/21 09:02:40 cgd Exp $ */ /*- @@ -69,10 +69,6 @@ typedef void *ioctl_t; /* Third arg of ioctl */ #include "char.h" #include "error.h" -#define xmalloc(i) Malloc(i) -#define xreallocarray(p, i, j) Reallocarray(p, i, j) -#define xcalloc(n, s) Calloc(n, s) - #include <stdio.h> FILE *cshin, *cshout, *csherr; diff --git a/bin/csh/extern.h b/bin/csh/extern.h index 8a72e9e499f..0b2481ac06f 100644 --- a/bin/csh/extern.h +++ b/bin/csh/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.28 2018/09/17 16:00:19 martijn Exp $ */ +/* $OpenBSD: extern.h,v 1.29 2018/09/18 02:29:10 miko Exp $ */ /* $NetBSD: extern.h,v 1.8 1996/10/31 23:50:54 christos Exp $ */ /*- @@ -280,9 +280,9 @@ void psecs(long); /* * alloc.c */ -void * Malloc(size_t); -void * Reallocarray(void *, size_t, size_t); -void * Calloc(size_t, size_t); +void * xmalloc(size_t); +void * xreallocarray(void *, size_t, size_t); +void * xcalloc(size_t, size_t); /* * str.c: |