From: Sami Kerola Date: Sun, 14 Aug 2016 20:40:33 +0000 (+0100) Subject: cleanup: remove unnecessary null check X-Git-Tag: v0.88~38^2~1^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3882c27775013061fd615b04c2008661f17d0978;p=thirdparty%2Fmtr.git cleanup: remove unnecessary null check The fmt_ipinfo() returns variable from stack. In order a stack variable to point to NULL there has to go so much things wrong that the program cannot run - effectively this can happen when system memory is so low that even global variables cannot be allocated. --- diff --git a/report.c b/report.c index 219bc32..e2f858c 100644 --- a/report.c +++ b/report.c @@ -458,7 +458,7 @@ void csv_close(time_t now) #ifdef IPINFO if(!ipinfo_no) { char* fmtinfo = fmt_ipinfo(addr); - if (fmtinfo != NULL) fmtinfo = trim(fmtinfo); + fmtinfo = trim(fmtinfo); printf("MTR.%s,%lld,%s,%s,%d,%s,%s", MTR_VERSION, (long long)now, "OK", Hostname, at+1, name, fmtinfo); } else