From 07aa6ef0c91340b85ada6b16f6176641a7143e65 Mon Sep 17 00:00:00 2001 From: Jacques Vidrine Date: Fri, 31 Mar 2000 15:02:10 +0000 Subject: [PATCH] Instead of checking for a non-zero return value from kvm_read, check whether we read as many bytes as we expected. --- usr.bin/ipcs/ipcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/ipcs/ipcs.c b/usr.bin/ipcs/ipcs.c index 0665c5019a83..3ea8a574075a 100644 --- a/usr.bin/ipcs/ipcs.c +++ b/usr.bin/ipcs/ipcs.c @@ -216,7 +216,7 @@ main(argc, argv) } if ((display & (MSGINFO | MSGTOTAL)) && - kvm_read(kd, symbols[X_MSGINFO].n_value, &msginfo, sizeof(msginfo))) { + kvm_read(kd, symbols[X_MSGINFO].n_value, &msginfo, sizeof(msginfo))== sizeof(msginfo)) { if (display & MSGTOTAL) { printf("msginfo:\n");