diff options
author | Jim Meyering <jim@meyering.net> | 2005-12-03 23:24:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-12-03 23:24:46 +0000 |
commit | a936ac291c4a5b3e7eb6e3ace9731fde40488440 (patch) | |
tree | e7317d299a8033ce1f8019fec657b1d917b701aa /src | |
parent | b3e300393eec62bfe619d2d5531350045a26036e (diff) | |
download | coreutils-a936ac291c4a5b3e7eb6e3ace9731fde40488440.tar.xz |
(print_uptime): Move decl of local `upsecs' into scope where it's used.
Diffstat (limited to 'src')
-rw-r--r-- | src/uptime.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/uptime.c b/src/uptime.c index 5118956ea..da8618e28 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -59,7 +59,6 @@ print_uptime (size_t n, const STRUCT_UTMP *this) int loads; #ifdef HAVE_PROC_UPTIME FILE *fp; - double upsecs; fp = fopen ("/proc/uptime", "r"); if (fp != NULL) @@ -69,7 +68,7 @@ print_uptime (size_t n, const STRUCT_UTMP *this) if (b == buf) { char *end_ptr; - upsecs = c_strtod (buf, &end_ptr); + double upsecs = c_strtod (buf, &end_ptr); if (buf != end_ptr) uptime = (0 <= upsecs && upsecs < TYPE_MAXIMUM (time_t) ? upsecs : -1); |