summaryrefslogtreecommitdiff
path: root/sysklogd
diff options
context:
space:
mode:
authorDenis Vlasenko2007-11-03 23:17:40 +0000
committerDenis Vlasenko2007-11-03 23:17:40 +0000
commitfa3f806cd0730ddc53765f04a846087b99db847a (patch)
treec76e82b7f511a099cb1c107e13de57207926f89b /sysklogd
parent43f0a0bb3a178794ac9fa3f5010db680c5d1b018 (diff)
downloadbusybox-fa3f806cd0730ddc53765f04a846087b99db847a.zip
busybox-fa3f806cd0730ddc53765f04a846087b99db847a.tar.gz
apply accumulated post 1.7.2 patches; bump version to 1.7.31_7_3
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/logger.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index df5d8ff..6e1debd 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -107,7 +107,7 @@ int logger_main(int argc, char **argv)
argv += optind;
if (!argc) {
#define strbuf bb_common_bufsiz1
- while (fgets(strbuf, BUFSIZ, stdin)) {
+ while (fgets(strbuf, COMMON_BUFSIZE, stdin)) {
if (strbuf[0]
&& NOT_LONE_CHAR(strbuf, '\n')
) {
@@ -117,11 +117,11 @@ int logger_main(int argc, char **argv)
}
} else {
char *message = NULL;
- int len = 1; /* for NUL */
+ int len = 0;
int pos = 0;
do {
len += strlen(*argv) + 1;
- message = xrealloc(message, len);
+ message = xrealloc(message, len + 1);
sprintf(message + pos, " %s", *argv),
pos = len;
} while (*++argv);