From a936ac291c4a5b3e7eb6e3ace9731fde40488440 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 3 Dec 2005 23:24:46 +0000 Subject: (print_uptime): Move decl of local `upsecs' into scope where it's used. --- src/uptime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/uptime.c') 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); -- cgit v1.2.3-54-g00ecf