Code

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 a6fc1abf381db3572d479b02257226414d6bf2bc..01bd52722c14a2c1d2b1748cae30f5904e7e62a7 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]);