summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-06-06 20:59:15 +0000
committerjmallett <jmallett@FreeBSD.org>2002-06-06 20:59:15 +0000
commitb00060629b3ce16fbaae1856247191506fb052e0 (patch)
treed25dc6c323eed8018be8e69287f43e26db3bad7b
parent165d918ce293215666843d139946e71de1ae944f (diff)
downloadFreeBSD-src-b00060629b3ce16fbaae1856247191506fb052e0.zip
FreeBSD-src-b00060629b3ce16fbaae1856247191506fb052e0.tar.gz
sysctlbyname(3) returns -1 on failure, not any other value < 0.
-rw-r--r--bin/ps/nlist.c6
1 files changed, 3 insertions, 3 deletions
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);
OpenPOWER on IntegriCloud