aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-12 21:01:05 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-12 21:01:05 +0000
commit4df8135cf6f4c4055a6eeb56eab6fd794c348a72 (patch)
treea08aa512d34f8a8e3aca4588c6866e390aabe48a
parent5d68724d5b89fbf2856fdfbf36b85ac36a8f4464 (diff)
downloadbusybox-4df8135cf6f4c4055a6eeb56eab6fd794c348a72.tar.gz
undo RESERVE_CONFIG_BUFFER change. aldot, small on-stack char[N] objects
are perfectly okay, don't convert them to RESERVE_CONFIG_BUFFERs.
-rw-r--r--sysklogd/logger.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index c5e17c2e5..8aaf522d0 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -83,26 +83,24 @@ static int pencode(char *s)
int logger_main(int argc, char **argv)
{
- char *opt_p, *opt_t;
+ char *str_p, *str_t;
int i = 0;
- RESERVE_CONFIG_BUFFER(name, 80);
+ char name[80];
/* Fill out the name string early (may be overwritten later) */
bb_getpwuid(name, geteuid(), sizeof(name));
+ str_t = name;
/* Parse any options */
- getopt32(argc, argv, "p:st:", &opt_p, &opt_t);
+ getopt32(argc, argv, "p:st:", &str_p, &str_t);
if (option_mask32 & 0x2) /* -s */
i |= LOG_PERROR;
- if (option_mask32 & 0x4) /* -t */
- safe_strncpy(name, opt_t, sizeof(name));
- openlog(name, i, 0);
- if (ENABLE_FEATURE_CLEAN_UP)
- RELEASE_CONFIG_BUFFER(name);
+ //if (option_mask32 & 0x4) /* -t */
+ openlog(str_t, i, 0);
i = LOG_USER | LOG_NOTICE;
if (option_mask32 & 0x1) /* -p */
- i = pencode(opt_p);
+ i = pencode(str_p);
argc -= optind;
argv += optind;