From: David van Moolenbroek Date: Thu, 1 Oct 2009 10:31:29 +0000 (+0000) Subject: Fix erroneous times() call in udpstat/tcpstat. X-Git-Tag: v3.1.5~57 X-Git-Url: http://zhaoyanbai.com/repos/nsupdate.html?a=commitdiff_plain;h=a8ebc69c6ec1eed2be222cba774a1de01f236ad9;p=minix.git Fix erroneous times() call in udpstat/tcpstat. Reported by John Peace, bug #312. Also fix times(2) man page. --- diff --git a/commands/simple/tcpstat.c b/commands/simple/tcpstat.c index 6fa78da65..2d2a8f235 100644 --- a/commands/simple/tcpstat.c +++ b/commands/simple/tcpstat.c @@ -52,6 +52,7 @@ int main(int argc, char*argv[]) clock_t now; int fl; int a_flag, n_flag, v_flag; + struct tms tmsbuf; getsysinfo_up(PM_PROC_NR, SIU_SYSTEMHZ, sizeof(system_hz), &system_hz); @@ -130,7 +131,7 @@ int main(int argc, char*argv[]) } now= uptime.tv_sec * HZ + (uptime.tv_usec*HZ/1000000); #else /* Minix 3 */ - now= times(NULL); + now= times(&tmsbuf); #endif for (i= 0; i