From: Paul Eggert Date: Sun, 16 Sep 2018 06:17:15 +0000 (-0700) Subject: Simplify get_up_time on GNU/Linux X-Git-Tag: emacs-27.0.90~4408 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7fac15f9945ed6def9b60942f3595c18f1740f31;p=emacs.git Simplify get_up_time on GNU/Linux * src/sysdep.c (get_up_time) [GNU_LINUX && HAVE_LONG_LONG_INT]: Omit unused locals. --- diff --git a/src/sysdep.c b/src/sysdep.c index ecbbbbc0ef3..722d8138ded 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -3111,13 +3111,12 @@ get_up_time (void) if (fup) { - unsigned long long upsec, upfrac, idlesec, idlefrac; - int upfrac_start, upfrac_end, idlefrac_start, idlefrac_end; + unsigned long long upsec, upfrac; + int upfrac_start, upfrac_end; - if (fscanf (fup, "%llu.%n%llu%n %llu.%n%llu%n", - &upsec, &upfrac_start, &upfrac, &upfrac_end, - &idlesec, &idlefrac_start, &idlefrac, &idlefrac_end) - == 4) + if (fscanf (fup, "%llu.%n%llu%n", + &upsec, &upfrac_start, &upfrac, &upfrac_end) + == 2) { if (TYPE_MAXIMUM (time_t) < upsec) {