summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-09-15 23:17:15 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-09-15 23:17:43 -0700
commit7fac15f9945ed6def9b60942f3595c18f1740f31 (patch)
tree04fdf8689520b60fd273cfe9c4aba7a9272a0818 /src/sysdep.c
parentd2048949bcd5735c17b4a194fc75d16ba25907ca (diff)
downloademacs-7fac15f9945ed6def9b60942f3595c18f1740f31.tar.gz
Simplify get_up_time on GNU/Linux
* src/sysdep.c (get_up_time) [GNU_LINUX && HAVE_LONG_LONG_INT]: Omit unused locals.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c11
1 files changed, 5 insertions, 6 deletions
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)
{