]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify get_up_time on GNU/Linux
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 16 Sep 2018 06:17:15 +0000 (23:17 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 16 Sep 2018 06:17:43 +0000 (23:17 -0700)
* src/sysdep.c (get_up_time) [GNU_LINUX && HAVE_LONG_LONG_INT]:
Omit unused locals.

src/sysdep.c

index ecbbbbc0ef34315622fb01d95e6403293d7a4362..722d8138ded2915ba2aa00bd42e526f65de0674e 100644 (file)
@@ -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)
            {