From 8d9761284290aebd1f80b4d2fe7d53471d2534e9 Mon Sep 17 00:00:00 2001 From: kris Date: Fri, 13 Apr 2007 16:28:13 +0000 Subject: [PATCH] Remove test against memory returned by safe_zalloc() in TraceProbe::nameIP() in traceroute.cc. The safe_* memory functions never return NULL. --- traceroute.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/traceroute.cc b/traceroute.cc index 2cc353eef..42be405ed 100644 --- a/traceroute.cc +++ b/traceroute.cc @@ -1324,10 +1324,7 @@ TraceProbe::~TraceProbe () { } const char *TraceProbe::nameIP(void) { - if((hostnameip = (char *) safe_zalloc(NAMEIPLEN)) == NULL) { - perror("traceroute malloc()"); - return NULL; - } + hostnameip = (char *) safe_zalloc(NAMEIPLEN); if(hostname == NULL || *hostname == NULL) snprintf(hostnameip, NAMEIPLEN, "%s", inet_ntoa(ipreplysrc));