]> icculus.org git repositories - icculus/xz.git/commit
Use sysctl() != -1 instead of !sysctl() to check if
authorLasse Collin <lasse.collin@tukaani.org>
Fri, 4 Sep 2009 22:20:29 +0000 (01:20 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 4 Sep 2009 22:20:29 +0000 (01:20 +0300)
commit60ccb80c9c4a0d771acc5b7d9d6f32b17fed1071
tree7b769ed2608f10e82dce96e82115bfa0d4db11fb
parent173368911cf09ab0b03fc4db8f3d4b81d86dce32
Use sysctl() != -1 instead of !sysctl() to check if
the function call succeeded.

NetBSD 4.0 returns positive values on success, but
NetBSD Current and FreeBSD return zero. OpenBSD's
man page doesn't tell what sysctl() returns on
success. All these BSDs return -1 on error.

Thanks to Robert Elz and Thomas Klausner.
src/common/cpucores.h
src/common/physmem.h