From 9975595b9bf1a1130a367598bff61c625f640614 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 21 Mar 2019 21:32:22 +0000 Subject: [PATCH] pgrep.c: simplifying uptime call --- pgrep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgrep.c b/pgrep.c index 1e08992b..58a8842b 100644 --- a/pgrep.c +++ b/pgrep.c @@ -530,14 +530,14 @@ static struct el * select_procs (int *num) char *cmdoutput = xmalloc(cmdlen); proc_t ns_task; time_t now; - double uptime_secs, idle_secs; + int uptime_secs; ptp = do_openproc(); preg = do_regcomp(); now = time(NULL); - if (uptime(&uptime_secs, &idle_secs) == 0) + if ((uptime_secs=uptime(0,0)) == 0) xerrx(EXIT_FAILURE, "uptime"); if (opt_newest) saved_start_time = 0ULL;