From b00060629b3ce16fbaae1856247191506fb052e0 Mon Sep 17 00:00:00 2001 From: jmallett Date: Thu, 6 Jun 2002 20:59:15 +0000 Subject: sysctlbyname(3) returns -1 on failure, not any other value < 0. --- bin/ps/nlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/ps') diff --git a/bin/ps/nlist.c b/bin/ps/nlist.c index e97279e..19acfb8 100644 --- a/bin/ps/nlist.c +++ b/bin/ps/nlist.c @@ -59,13 +59,13 @@ donlist(void) size_t oldlen; oldlen = sizeof(ccpu); - if (sysctlbyname("kern.ccpu", &ccpu, &oldlen, NULL, 0) < 0) + if (sysctlbyname("kern.ccpu", &ccpu, &oldlen, NULL, 0) == -1) return (1); oldlen = sizeof(fscale); - if (sysctlbyname("kern.fscale", &fscale, &oldlen, NULL, 0) < 0) + if (sysctlbyname("kern.fscale", &fscale, &oldlen, NULL, 0) == -1) return (1); oldlen = sizeof(mempages); - if (sysctlbyname("hw.availpages", &mempages, &oldlen, NULL, 0) < 0) + if (sysctlbyname("hw.availpages", &mempages, &oldlen, NULL, 0) == -1) return (1); nlistread = 1; return (0); -- cgit v1.1