From: Sami Kerola Date: Mon, 29 Aug 2016 21:38:05 +0000 (+0100) Subject: posix: do not use time(2) input argument X-Git-Tag: v0.88~26^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f9e8e23ceb84b54c600a1274ee42b3f5df4f4f4;p=thirdparty%2Fmtr.git posix: do not use time(2) input argument Function time(2) argument is obsolescent and should always be NULL in new code. When the argument is NULL, the call cannot fail. Reference: http://man7.org/linux/man-pages/man2/time.2.html --- diff --git a/curses.c b/curses.c index 74e6076..34fdafb 100644 --- a/curses.c +++ b/curses.c @@ -655,7 +655,7 @@ extern void mtr_curses_redraw(struct mtr_ctl *ctl) printw("bitpattern=rand(0x00-FF))"); } */ - time(&t); + t = time(NULL); mvprintw(1, maxx-25, iso_time(&t)); printw("\n");