summaryrefslogtreecommitdiff
path: root/usr.sbin/ypbind
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/ypbind
parent6e5d9523d6273368df6377a4db98a9533d11505c (diff)
stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw
Diffstat (limited to 'usr.sbin/ypbind')
-rw-r--r--usr.sbin/ypbind/ypbind.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index fb06598411b..5ab2140774a 100644
--- a/usr.sbin/ypbind/ypbind.c
+++ b/usr.sbin/ypbind/ypbind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypbind.c,v 1.63 2015/01/16 06:40:22 deraadt Exp $ */
+/* $OpenBSD: ypbind.c,v 1.64 2015/08/20 22:39:30 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993, 1996, 1997, 1998 Theo de Raadt <deraadt@openbsd.org>
@@ -153,7 +153,7 @@ ypbindproc_domain_2x(SVCXPRT *transp, domainname *argp, CLIENT *clnt)
break;
if (ypdb == NULL) {
- ypdb = (struct _dom_binding *)malloc(sizeof *ypdb);
+ ypdb = malloc(sizeof *ypdb);
if (ypdb == NULL)
return NULL;
memset(ypdb, 0, sizeof *ypdb);
@@ -512,7 +512,7 @@ main(int argc, char *argv[])
errx(1, "bad domainname %s", domain);
/* build initial domain binding, make it "unsuccessful" */
- ypbindlist = (struct _dom_binding *)malloc(sizeof *ypbindlist);
+ ypbindlist = malloc(sizeof *ypbindlist);
if (ypbindlist == NULL)
errx(1, "no memory");
memset(ypbindlist, 0, sizeof *ypbindlist);
@@ -545,8 +545,7 @@ main(int argc, char *argv[])
width = rpcsock;
if (pingsock > __svc_fdsetsize)
width = pingsock;
- fdsrp = (fd_set *)calloc(howmany(width+1, NFDBITS),
- sizeof(fd_mask));
+ fdsrp = calloc(howmany(width+1, NFDBITS), sizeof(fd_mask));
if (fdsrp == NULL)
errx(1, "no memory");
}
@@ -990,7 +989,7 @@ rpc_received(char *dom, struct sockaddr_in *raddrp, int force)
if (ypdb == NULL) {
if (force == 0)
return;
- ypdb = (struct _dom_binding *)malloc(sizeof *ypdb);
+ ypdb = malloc(sizeof *ypdb);
if (ypdb == NULL)
return;
memset(ypdb, 0, sizeof *ypdb);