diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-20 22:39:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-20 22:39:31 +0000 |
commit | aa0cb4643fc13729e7874a5eb16e9eecd90c1ced (patch) | |
tree | 1b6337f56b8a55bfda6bab69525fe62675d14e0e /usr.sbin/user | |
parent | 6e5d9523d6273368df6377a4db98a9533d11505c (diff) |
stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw
Diffstat (limited to 'usr.sbin/user')
-rw-r--r-- | usr.sbin/user/defs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/user/defs.h b/usr.sbin/user/defs.h index 2891fdda929..18bc9d2f3c9 100644 --- a/usr.sbin/user/defs.h +++ b/usr.sbin/user/defs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: defs.h,v 1.5 2014/12/01 23:08:23 deraadt Exp $ */ +/* $OpenBSD: defs.h,v 1.6 2015/08/20 22:39:29 deraadt Exp $ */ /* $NetBSD: defs.h,v 1.5 1999/12/24 09:08:49 agc Exp $ */ /* @@ -35,7 +35,7 @@ #define DEFS_H_ #define NEWARRAY(type,ptr,size,action) do { \ - if ((ptr = (type *) calloc((size), \ + if ((ptr = calloc((size), \ sizeof(type))) == (type *) NULL) { \ warn("can't allocate %ld bytes", \ (long)((size) * sizeof(type))); \ @@ -44,7 +44,7 @@ } while( /* CONSTCOND */ 0) #define RENEW(type,ptr,size,action) do { \ - if ((ptr = (type *) reallocarray(ptr, \ + if ((ptr = reallocarray(ptr, \ (size), sizeof(type))) == (type *) NULL) { \ warn("can't realloc %ld bytes", \ (long)((size) * sizeof(type))); \ |