freebsd branch: memory plugin: Use `errno', not the return value of `sysctlbyname...
authorocto <octo>
Wed, 7 Jun 2006 17:11:15 +0000 (17:11 +0000)
committerocto <octo>
Wed, 7 Jun 2006 17:11:15 +0000 (17:11 +0000)
src/memory.c

index a6fc1ab..01bd527 100644 (file)
@@ -217,7 +217,7 @@ static void memory_read (void)
                                                NULL, 0)) < 0)
                {
                        syslog (LOG_ERR, "memory plugin: sysctlbyname (%s): %s",
-                                       sysctl_keys[i], strerror (status));
+                                       sysctl_keys[i], strerror (errno));
                        return;
                }
                DBG ("%26s: %6i", sysctl_keys[i], sysctl_vals[i]);