diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-06-06 20:59:15 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-06-06 20:59:15 +0000 |
commit | b00060629b3ce16fbaae1856247191506fb052e0 (patch) | |
tree | d25dc6c323eed8018be8e69287f43e26db3bad7b /bin | |
parent | 165d918ce293215666843d139946e71de1ae944f (diff) | |
download | FreeBSD-src-b00060629b3ce16fbaae1856247191506fb052e0.zip FreeBSD-src-b00060629b3ce16fbaae1856247191506fb052e0.tar.gz |
sysctlbyname(3) returns -1 on failure, not any other value < 0.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ps/nlist.c | 6 |
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); |