Don't need cast malloc.

Approved by:		rodrigc (mentor)
Differential Revision:	D4117
This commit is contained in:
Marcelo Araujo 2015-11-16 03:18:40 +00:00
parent 9ed7fa550e
commit 17c1dcd408
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=290903

View file

@ -199,7 +199,7 @@ rejecting.", *argp);
res.ypbind_resp_u.ypbind_error = YPBIND_ERR_RESC; res.ypbind_resp_u.ypbind_error = YPBIND_ERR_RESC;
return (&res); return (&res);
} }
ypdb = (struct _dom_binding *)malloc(sizeof *ypdb); ypdb = malloc(sizeof *ypdb);
if (ypdb == NULL) { if (ypdb == NULL) {
syslog(LOG_WARNING, "malloc: %m"); syslog(LOG_WARNING, "malloc: %m");
res.ypbind_resp_u.ypbind_error = YPBIND_ERR_RESC; 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)"); errx(1, "unable to register (YPBINDPROG, YPBINDVERS, tcp)");
/* build initial domain binding, make it "unsuccessful" */ /* build initial domain binding, make it "unsuccessful" */
ypbindlist = (struct _dom_binding *)malloc(sizeof *ypbindlist); ypbindlist = malloc(sizeof *ypbindlist);
if (ypbindlist == NULL) if (ypbindlist == NULL)
errx(1, "malloc"); errx(1, "malloc");
bzero(ypbindlist, sizeof *ypbindlist); bzero(ypbindlist, sizeof *ypbindlist);
@ -886,7 +886,7 @@ rpc_received(char *dom, struct sockaddr_in *raddrp, int force)
if (ypdb == NULL) { if (ypdb == NULL) {
if (force == 0) if (force == 0)
return; return;
ypdb = (struct _dom_binding *)malloc(sizeof *ypdb); ypdb = malloc(sizeof *ypdb);
if (ypdb == NULL) { if (ypdb == NULL) {
syslog(LOG_WARNING, "malloc: %m"); syslog(LOG_WARNING, "malloc: %m");
return; return;