aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ypbind/ypbind.c
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2015-11-16 03:18:40 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2015-11-16 03:18:40 +0000
commit17c1dcd408358096c4b6a8b06c7a9f63e2a14ba5 (patch)
tree1680183bcf0ac9479a2dc6773c81a3273d902f05 /usr.sbin/ypbind/ypbind.c
parent9ed7fa550e1e39e095875847b801208c15e8dc57 (diff)
downloadsrc-17c1dcd408358096c4b6a8b06c7a9f63e2a14ba5.tar.gz
src-17c1dcd408358096c4b6a8b06c7a9f63e2a14ba5.zip
Don't need cast malloc.
Approved by: rodrigc (mentor) Differential Revision: D4117
Notes
Notes: svn path=/head/; revision=290903
Diffstat (limited to 'usr.sbin/ypbind/ypbind.c')
-rw-r--r--usr.sbin/ypbind/ypbind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index af4913381aaa..39bdd740961a 100644
--- a/usr.sbin/ypbind/ypbind.c
+++ b/usr.sbin/ypbind/ypbind.c
@@ -199,7 +199,7 @@ rejecting.", *argp);
res.ypbind_resp_u.ypbind_error = YPBIND_ERR_RESC;
return (&res);
}
- ypdb = (struct _dom_binding *)malloc(sizeof *ypdb);
+ ypdb = malloc(sizeof *ypdb);
if (ypdb == NULL) {
syslog(LOG_WARNING, "malloc: %m");
res.ypbind_resp_u.ypbind_error = YPBIND_ERR_RESC;
@@ -452,7 +452,7 @@ main(int argc, char *argv[])
errx(1, "unable to register (YPBINDPROG, YPBINDVERS, tcp)");
/* build initial domain binding, make it "unsuccessful" */
- ypbindlist = (struct _dom_binding *)malloc(sizeof *ypbindlist);
+ ypbindlist = malloc(sizeof *ypbindlist);
if (ypbindlist == NULL)
errx(1, "malloc");
bzero(ypbindlist, sizeof *ypbindlist);
@@ -886,7 +886,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) {
syslog(LOG_WARNING, "malloc: %m");
return;