aboutsummaryrefslogtreecommitdiff
path: root/dmesg.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmesg.c')
-rw-r--r--dmesg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dmesg.c b/dmesg.c
index a32ca79dc..1d33b7641 100644
--- a/dmesg.c
+++ b/dmesg.c
@@ -86,7 +86,7 @@ int dmesg_main(int argc, char **argv)
lastc = '\n';
for (i = 0; i < n; i++) {
- if ((i == 0 || buf[i - 1] == '\n') && buf[i] == '<') {
+ if (lastc == '\n' && buf[i] == '<') {
i++;
while (buf[i] >= '0' && buf[i] <= '9')
i++;