* lib/getloadavg.c (getloadavg): Fix double-increment typo on
Linux without glibc, Android, Cygwin. This fixes a bug I
introduced in 2011-02-08T20:23:29Z!eggert@cs.ucla.edu.
Problem and fix reported by Semen Verchenko in:
https://lists.gnu.org/r/bug-gnulib/2020-06/msg00007.html
2020-06-01 Paul Eggert <eggert@cs.ucla.edu>
+ getloadavg: fix double-increment bug
+ * lib/getloadavg.c (getloadavg): Fix double-increment typo on
+ Linux without glibc, Android, Cygwin. This fixes a bug I
+ introduced in 2011-02-08T20:23:29Z!eggert@cs.ucla.edu.
+ Problem and fix reported by Semen Verchenko in:
+ https://lists.gnu.org/r/bug-gnulib/2020-06/msg00007.html
+
tempname: use getrandom, not getentropy
This removes a dependency, as getentropy depends on getrandom.
* lib/tempname.c: Include sys/random.h instead of unistd.h.
for (ptr++; '0' <= *ptr && *ptr <= '9'; ptr++)
numerator = 10 * numerator + (*ptr - '0'), denominator *= 10;
- loadavg[elem++] = numerator / denominator;
+ loadavg[elem] = numerator / denominator;
}
return elem;