]> git.eshelyaron.com Git - emacs.git/commitdiff
*** empty log message ***
authorDavid J. MacKenzie <djm@gnu.org>
Mon, 12 Jul 1993 22:13:12 +0000 (22:13 +0000)
committerDavid J. MacKenzie <djm@gnu.org>
Mon, 12 Jul 1993 22:13:12 +0000 (22:13 +0000)
src/getloadavg.c

index 49612bf2b578cb347bb3ff00f6afd69802861269..8dba8a181f348c2193f8e0b6d3cc3de1b8fd4168 100644 (file)
@@ -436,7 +436,7 @@ static kvm_t *kd;
 \f
 /* Put the 1 minute, 5 minute and 15 minute load averages
    into the first NELEM elements of LOADAVG.
-   Return the number written (never more than 3),
+   Return the number written (never more than 3, but may be less than NELEM),
    or -1 if an error occurred.  */
 
 int
@@ -494,12 +494,8 @@ getloadavg (loadavg, nelem)
   struct processor_set_basic_info info;
   unsigned info_count;
 
-  if (nelem > 1)
-    {
-      /* We only know how to get the 1-minute average for this system.  */
-      errno = EINVAL;
-      return -1;
-    }
+  /* We only know how to get the 1-minute average for this system,
+     so even if the caller asks for more than 1, we only return 1.  */
 
   if (!getloadavg_initialized)
     {