aboutsummaryrefslogtreecommitdiff
path: root/sysklogd
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-06-04 10:16:52 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-06-04 10:16:52 +0000
commit74324c86663f57a19c1de303ee8c8e5449db9ef2 (patch)
tree11f5da9de4212875ce5811be2e1050e076378c9a /sysklogd
parent4e5f82c76f08614d0b69f9ec4a8baac303af15f6 (diff)
downloadbusybox-74324c86663f57a19c1de303ee8c8e5449db9ef2.tar.gz
busybox-74324c86663f57a19c1de303ee8c8e5449db9ef2.tar.bz2
Audit bb_common_bufsiz usage, add script which looks for misuse.
tr: stop using globals needlessly. code: -103 bytes
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/logger.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index 971a6beae..d9c3e5048 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -106,12 +106,13 @@ int logger_main(int argc, char **argv)
argc -= optind;
argv += optind;
if (!argc) {
- while (fgets(bb_common_bufsiz1, BUFSIZ, stdin)) {
- if (bb_common_bufsiz1[0]
- && NOT_LONE_CHAR(bb_common_bufsiz1, '\n')
+#define strbuf bb_common_bufsiz1
+ while (fgets(strbuf, BUFSIZ, stdin)) {
+ if (strbuf[0]
+ && NOT_LONE_CHAR(strbuf, '\n')
) {
/* Neither "" nor "\n" */
- syslog(i, "%s", bb_common_bufsiz1);
+ syslog(i, "%s", strbuf);
}
}
} else {