Instead of checking for a non-zero return value from kvm_read, check

whether we read as many bytes as we expected.
This commit is contained in:
Jacques Vidrine 2000-03-31 15:02:10 +00:00
parent 4c2b812c39
commit 07aa6ef0c9

View File

@ -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");