diff options
Diffstat (limited to 'tcpip/rip98r.c')
-rw-r--r-- | tcpip/rip98r.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tcpip/rip98r.c b/tcpip/rip98r.c index b1f283c..57afe4e 100644 --- a/tcpip/rip98r.c +++ b/tcpip/rip98r.c @@ -160,7 +160,8 @@ void receive_routes(int s) case ADDITIONAL_ROUTE: if (!found) { - if ((new = malloc(sizeof(struct route_struct))) == NULL) { + new = malloc(sizeof(struct route_struct)); + if (new == NULL) { if (logging) syslog(LOG_ERR, "out of memory\n"); return; @@ -186,7 +187,8 @@ void receive_routes(int s) } if (!matched) { - if ((new = malloc(sizeof(struct route_struct))) == NULL) { + new = malloc(sizeof(struct route_struct)); + if (new == NULL) { if (logging) syslog(LOG_ERR, "out of memory\n"); return; |