summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rbootd/utils.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-08-20 22:39:29 +0000
committerderaadt <deraadt@openbsd.org>2015-08-20 22:39:29 +0000
commit35de856ed2be5e6bd284466437ecec8c238ee751 (patch)
tree52317c381e559008ce133dcf7b89f7ed3ce53858 /usr.sbin/rbootd/utils.c
parentDo not cast result of malloc/calloc/realloc* if stdlib.h is in scope (diff)
downloadwireguard-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/rbootd/utils.c')
-rw-r--r--usr.sbin/rbootd/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rbootd/utils.c b/usr.sbin/rbootd/utils.c
index b89e6e4611d..41a8dfd3b2f 100644
--- a/usr.sbin/rbootd/utils.c
+++ b/usr.sbin/rbootd/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.13 2015/01/16 06:40:19 deraadt Exp $ */
+/* $OpenBSD: utils.c,v 1.14 2015/08/20 22:39:29 deraadt Exp $ */
/* $NetBSD: utils.c,v 1.5.2.1 1995/11/14 08:45:46 thorpej Exp $ */
/*
@@ -268,7 +268,7 @@ NewClient(u_int8_t *addr)
{
CLIENT *ctmp;
- if ((ctmp = (CLIENT *) malloc(sizeof(CLIENT))) == NULL) {
+ if ((ctmp = malloc(sizeof(CLIENT))) == NULL) {
syslog(LOG_ERR, "NewClient: out of memory (%s)",
GetEtherAddr(addr));
return(NULL);
@@ -359,7 +359,7 @@ NewConn(RMPCONN *rconn)
RMPCONN *rtmp;
if (LastFree == NULL) { /* nothing cached; make a new one */
- if ((rtmp = (RMPCONN *) malloc(sizeof(RMPCONN))) == NULL) {
+ if ((rtmp = malloc(sizeof(RMPCONN))) == NULL) {
syslog(LOG_ERR, "NewConn: out of memory (%s)",
EnetStr(rconn));
return(NULL);