summaryrefslogtreecommitdiff
path: root/usr.sbin/rbootd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:39:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:39:31 +0000
commitaa0cb4643fc13729e7874a5eb16e9eecd90c1ced (patch)
tree1b6337f56b8a55bfda6bab69525fe62675d14e0e /usr.sbin/rbootd
parent6e5d9523d6273368df6377a4db98a9533d11505c (diff)
stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw
Diffstat (limited to 'usr.sbin/rbootd')
-rw-r--r--usr.sbin/rbootd/bpf.c4
-rw-r--r--usr.sbin/rbootd/utils.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/rbootd/bpf.c b/usr.sbin/rbootd/bpf.c
index 523a9553219..b5baf0429dd 100644
--- a/usr.sbin/rbootd/bpf.c
+++ b/usr.sbin/rbootd/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.22 2015/04/18 18:28:38 deraadt Exp $ */
+/* $OpenBSD: bpf.c,v 1.23 2015/08/20 22:39:29 deraadt Exp $ */
/* $NetBSD: bpf.c,v 1.5.2.1 1995/11/14 08:45:42 thorpej Exp $ */
/*
@@ -160,7 +160,7 @@ BpfOpen(void)
DoExit();
}
if (BpfPkt == NULL)
- BpfPkt = (u_int8_t *)malloc(BpfLen);
+ BpfPkt = malloc(BpfLen);
if (BpfPkt == NULL) {
syslog(LOG_ERR, "bpf: out of memory (%u bytes for bpfpkt)",
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);