Don't need cast malloc.
Approved by: rodrigc (mentor) Differential Revision: D4175
This commit is contained in:
parent
d03d60bd6b
commit
f59bfa7460
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user