From 53544380266a8eb38bef9389562fba3ed58a0d11 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 13 Oct 2014 11:12:28 -0700 Subject: foo --- sysdeps/unix/sysv/linux/getsysstats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux/getsysstats.c') diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c index 1746827e9e..22600f0226 100644 --- a/sysdeps/unix/sysv/linux/getsysstats.c +++ b/sysdeps/unix/sysv/linux/getsysstats.c @@ -144,11 +144,10 @@ __get_nprocs (void) const int flags = O_RDONLY | O_CLOEXEC; int fd = open_not_cancel_2 ("/sys/devices/system/cpu/online", flags); - char *l; int result = 0; if (fd != -1) { - l = next_line (fd, buffer, &cp, &re, buffer_end); + char *l = next_line (fd, buffer, &cp, &re, buffer_end); if (l != NULL) do { @@ -196,6 +195,7 @@ __get_nprocs (void) { result = 0; + char *l; while ((l = next_line (fd, buffer, &cp, &re, buffer_end)) != NULL) /* The current format of /proc/stat has all the cpu* entries at the front. We assume here that stays this way. */ -- cgit v1.2.1