diff options
author | deraadt <deraadt@openbsd.org> | 2015-08-20 22:39:29 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2015-08-20 22:39:29 +0000 |
commit | 35de856ed2be5e6bd284466437ecec8c238ee751 (patch) | |
tree | 52317c381e559008ce133dcf7b89f7ed3ce53858 /usr.sbin/rarpd | |
parent | Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope (diff) | |
download | wireguard-openbsd-35de856ed2be5e6bd284466437ecec8c238ee751.tar.xz wireguard-openbsd-35de856ed2be5e6bd284466437ecec8c238ee751.zip |
stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw
Diffstat (limited to 'usr.sbin/rarpd')
-rw-r--r-- | usr.sbin/rarpd/rarpd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c index ac1f966e4ca..df981e85498 100644 --- a/usr.sbin/rarpd/rarpd.c +++ b/usr.sbin/rarpd/rarpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rarpd.c,v 1.60 2015/07/16 17:51:22 miod Exp $ */ +/* $OpenBSD: rarpd.c,v 1.61 2015/08/20 22:39:29 deraadt Exp $ */ /* $NetBSD: rarpd.c,v 1.25 1998/04/23 02:48:33 mrg Exp $ */ /* @@ -205,7 +205,7 @@ init_one(char *ifname) if (fd < 0) return; - p = (struct if_info *)malloc(sizeof(*p)); + p = malloc(sizeof(*p)); if (p == 0) { error(FATAL, "malloc: %s", strerror(errno)); /* NOTREACHED */ @@ -400,7 +400,7 @@ rarp_loop(void) error(FATAL, "BIOCGBLEN: %s", strerror(errno)); /* NOTREACHED */ } - buf = (u_char *) malloc((size_t) bufsize); + buf = malloc((size_t) bufsize); if (buf == 0) { error(FATAL, "malloc: %s", strerror(errno)); /* NOTREACHED */ |