From 3882c27775013061fd615b04c2008661f17d0978 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 14 Aug 2016 21:40:33 +0100 Subject: [PATCH] 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. --- report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2