diff options
author | stefanf <stefanf@FreeBSD.org> | 2004-10-03 15:48:32 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2004-10-03 15:48:32 +0000 |
commit | f3f8ad79f64bcb2e92d92cfd6a77a532d50b8ca9 (patch) | |
tree | b6251711dd6e9d1b00be32f87d51336b7cfb47c1 /sbin/dmesg | |
parent | edc6f2e4d77116ba453ffed80df5f5e2b5686172 (diff) | |
download | FreeBSD-src-f3f8ad79f64bcb2e92d92cfd6a77a532d50b8ca9.zip FreeBSD-src-f3f8ad79f64bcb2e92d92cfd6a77a532d50b8ca9.tar.gz |
Don't add integers to void pointers.
Diffstat (limited to 'sbin/dmesg')
-rw-r--r-- | sbin/dmesg/dmesg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c index 12789fd..d24addd 100644 --- a/sbin/dmesg/dmesg.c +++ b/sbin/dmesg/dmesg.c @@ -166,10 +166,12 @@ main(int argc, char *argv[]) p++; } else if (!all) { /* Skip the first line, since it is probably incomplete. */ - p = memchr(p, '\n', ep - p) + 1; + p = memchr(p, '\n', ep - p); + p++; } for (; p < ep; p = nextp) { - nextp = memchr(p, '\n', ep - p) + 1; + nextp = memchr(p, '\n', ep - p); + nextp++; /* Skip ^<[0-9]+> syslog sequences. */ if (*p == '<') { |