kvm_nlist () returns -1 on error, but a positive return value does not

2000-02-13  Martin Baulig  <martin@home-of-linux.org>

	* *.c: kvm_nlist () returns -1 on error, but a positive return value
	does not necessarily mean failure. Fixes #3302 which was reported by
	Matthias Scheler some time ago.
This commit is contained in:
Martin Baulig
2000-02-13 15:28:24 +00:00
committed by Martin Baulig
parent 47d4322965
commit 3fec7a0946
10 changed files with 16 additions and 10 deletions

View File

@@ -82,7 +82,7 @@ static struct nlist nlst [] = {
int
glibtop_init_msg_limits_p (glibtop *server)
{
if (kvm_nlist (server->_priv->machine.kd, nlst) != 0) {
if (kvm_nlist (server->_priv->machine.kd, nlst) < 0) {
glibtop_warn_io_r (server, "kvm_nlist (msg_limits)");
return -1;
}