diff options
Diffstat (limited to 'sbin/dmesg')
-rw-r--r-- | sbin/dmesg/dmesg.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c index ad24e16..063e4b8 100644 --- a/sbin/dmesg/dmesg.c +++ b/sbin/dmesg/dmesg.c @@ -137,9 +137,7 @@ main(int argc, char *argv[]) errx(1, "kvm_read: %s", kvm_geterr(kd)); kvm_close(kd); buflen = cur.msg_size; - bufpos = cur.msg_bufx; - if (bufpos >= buflen) - bufpos = 0; + bufpos = MSGBUF_SEQ_TO_POS(&cur, cur.msg_wseq); } /* |