summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2000-12-09 16:41:42 +0000
committerEric Andersen2000-12-09 16:41:42 +0000
commitafdde3e356bb621f230e4ef556609368647399e6 (patch)
tree8b59082601203ec2d5125ceb1ad9b989381089a4
parent5b5db38a7df20c8196e6a737cb2c76b219e152cc (diff)
downloadbusybox-afdde3e356bb621f230e4ef556609368647399e6.zip
busybox-afdde3e356bb621f230e4ef556609368647399e6.tar.gz
Some little cleanups from Larry Doolittle
-rw-r--r--dmesg.c2
-rw-r--r--logger.c2
-rw-r--r--sysklogd/logger.c2
-rw-r--r--util-linux/dmesg.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/dmesg.c b/dmesg.c
index a32ca79..1d33b76 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++;
diff --git a/logger.c b/logger.c
index 1c454e5..669a2d6 100644
--- 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 {
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index 1c454e5..669a2d6 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 a32ca79..1d33b76 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++;