diff --git a/usr.sbin/ypserv/yp_access.c b/usr.sbin/ypserv/yp_access.c index a4ba5049f20c..dddde7405bba 100644 --- a/usr.sbin/ypserv/yp_access.c +++ b/usr.sbin/ypserv/yp_access.c @@ -129,7 +129,7 @@ load_securenets(void) if ((fp = fopen(path, "r")) == NULL) { if (errno == ENOENT) { - securenets = (struct securenet *)malloc(sizeof(struct securenet)); + securenets = malloc(sizeof(struct securenet)); securenets->net.s_addr = INADDR_ANY; securenets->mask.s_addr = INADDR_ANY; securenets->next = NULL; @@ -154,7 +154,7 @@ load_securenets(void) continue; } - tmp = (struct securenet *)malloc(sizeof(struct securenet)); + tmp = malloc(sizeof(struct securenet)); if (!inet_aton((char *)&addr1, (struct in_addr *)&tmp->net)) { yp_error("badly formatted securenets entry: %s", addr1); diff --git a/usr.sbin/ypserv/yp_dblookup.c b/usr.sbin/ypserv/yp_dblookup.c index 6a3bf1c462a0..ecd90522f7ad 100644 --- a/usr.sbin/ypserv/yp_dblookup.c +++ b/usr.sbin/ypserv/yp_dblookup.c @@ -103,13 +103,13 @@ yp_malloc_qent(void) { register struct circleq_entry *q; - q = (struct circleq_entry *)malloc(sizeof(struct circleq_entry)); + q = malloc(sizeof(struct circleq_entry)); if (q == NULL) { yp_error("failed to malloc() circleq entry"); return(NULL); } bzero((char *)q, sizeof(struct circleq_entry)); - q->dbptr = (struct dbent *)malloc(sizeof(struct dbent)); + q->dbptr = malloc(sizeof(struct dbent)); if (q->dbptr == NULL) { yp_error("failed to malloc() circleq entry"); free(q); diff --git a/usr.sbin/ypserv/yp_dnslookup.c b/usr.sbin/ypserv/yp_dnslookup.c index dfb5594fca50..1d83b64f0ae6 100644 --- a/usr.sbin/ypserv/yp_dnslookup.c +++ b/usr.sbin/ypserv/yp_dnslookup.c @@ -149,7 +149,7 @@ circleq_dnsentry *yp_malloc_dnsent(void) { register struct circleq_dnsentry *q; - q = (struct circleq_dnsentry *)malloc(sizeof(struct circleq_dnsentry)); + q = malloc(sizeof(struct circleq_dnsentry)); if (q == NULL) { yp_error("failed to malloc() circleq dns entry");