Mercurial > hg > xemacs-beta
diff src/getloadavg.c @ 280:7df0dd720c89 r21-0b38
Import from CVS: tag r21-0b38
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:32:22 +0200 |
parents | 90d73dddcdc4 |
children | c42ec1d1cded |
line wrap: on
line diff
--- a/src/getloadavg.c Mon Aug 13 10:31:30 2007 +0200 +++ b/src/getloadavg.c Mon Aug 13 10:32:22 2007 +0200 @@ -525,7 +525,7 @@ this function just can't work at all on this system. */ errno = 0; elem = -2; -#endif +#endif /* NO_GET_LOAD_AVG */ #if ! defined (LDAV_DONE) && defined (HAVE_KSTAT_H) && defined (HAVE_LIBKSTAT) #define LDAV_DONE @@ -546,7 +546,7 @@ if (nelem > countof (avestrings)) nelem = countof (avestrings); - kc = kstat_open(); + kc = kstat_open (); if (!kc) return -1; ksp = kstat_lookup (kc, "unix", 0, "system_misc"); @@ -568,7 +568,7 @@ kstat_close (kc); return -1; } - loadavg[elem] = (double)kn->value.ul/FSCALE; + loadavg[elem] = (double)kn->value.ul / FSCALE; } kstat_close (kc); #endif /* HAVE_KSTAT_H && HAVE_LIBKSTAT */ @@ -943,14 +943,7 @@ #define LDAV_DONE #endif /* !LDAV_DONE && LOAD_AVE_TYPE */ -#ifdef LDAV_DONE return elem; -#else - /* Set errno to zero to indicate that there was no particular error; - this function just can't work at all on this system. */ - errno = 0; - return -2; -#endif } #endif /* ! HAVE_GETLOADAVG */