aboutsummaryrefslogtreecommitdiff
path: root/sbin/dmesg
diff options
context:
space:
mode:
authorStefan Farfeleder <stefanf@FreeBSD.org>2004-10-03 15:48:32 +0000
committerStefan Farfeleder <stefanf@FreeBSD.org>2004-10-03 15:48:32 +0000
commit4c86f66f52371a52f2b5e9085709f2774128abd3 (patch)
treeb6251711dd6e9d1b00be32f87d51336b7cfb47c1 /sbin/dmesg
parent4e8c80e977270a75e4f11720651fca4eb6b24c78 (diff)
downloadsrc-4c86f66f52371a52f2b5e9085709f2774128abd3.tar.gz
src-4c86f66f52371a52f2b5e9085709f2774128abd3.zip
Don't add integers to void pointers.
Notes
Notes: svn path=/head/; revision=136092
Diffstat (limited to 'sbin/dmesg')
-rw-r--r--sbin/dmesg/dmesg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c
index 12789fd5619e..d24addd270a8 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 == '<') {