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:
parent
4c2b812c39
commit
07aa6ef0c9
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user