Some little cleanups from Larry Doolittle
authorEric Andersen <andersen@codepoet.org>
Sat, 9 Dec 2000 16:41:42 +0000 (16:41 -0000)
committerEric Andersen <andersen@codepoet.org>
Sat, 9 Dec 2000 16:41:42 +0000 (16:41 -0000)
dmesg.c
logger.c
sysklogd/logger.c
util-linux/dmesg.c

diff --git a/dmesg.c b/dmesg.c
index a32ca79dccfc4815e13bfdb7d7ae133968481240..1d33b7641f9ed10957b5c0c4f0d83934c03218ff 100644 (file)
--- 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++;
index 1c454e5af8594ed70bb9b892be482ad4cbd5f3d5..669a2d6010091551641ce11afa0b311524c0908e 100644 (file)
--- a/logger.c
+++ b/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 {
index 1c454e5af8594ed70bb9b892be482ad4cbd5f3d5..669a2d6010091551641ce11afa0b311524c0908e 100644 (file)
@@ -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 {
index a32ca79dccfc4815e13bfdb7d7ae133968481240..1d33b7641f9ed10957b5c0c4f0d83934c03218ff 100644 (file)
@@ -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++;