diff options
-rw-r--r-- | dmesg.c | 2 | ||||
-rw-r--r-- | logger.c | 2 | ||||
-rw-r--r-- | sysklogd/logger.c | 2 | ||||
-rw-r--r-- | util-linux/dmesg.c | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -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++; @@ -35,7 +35,7 @@ #else /* We have to do this since the header file defines static - * structues. Argh.... bad libc, bad, bad... + * structures. Argh.... bad libc, bad, bad... */ #include <sys/syslog.h> typedef struct _code { diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 1c454e5af..669a2d601 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c @@ -35,7 +35,7 @@ #else /* We have to do this since the header file defines static - * structues. Argh.... bad libc, bad, bad... + * structures. Argh.... bad libc, bad, bad... */ #include <sys/syslog.h> typedef struct _code { diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index a32ca79dc..1d33b7641 100644 --- a/util-linux/dmesg.c +++ b/util-linux/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++; |