aboutsummaryrefslogtreecommitdiff
path: root/sysklogd
diff options
context:
space:
mode:
authorGravatar Glenn L McGrath <bug1@ihug.co.nz>2003-09-10 23:35:45 +0000
committerGravatar Glenn L McGrath <bug1@ihug.co.nz>2003-09-10 23:35:45 +0000
commitfe538ba5d68391562b23d9d0902b4219b6329cad (patch)
treed05f7774202a614cf9ac1174f6a8206aeab5b94a /sysklogd
parent87af49f26b2293ab60d0f13d2a14cad66e02a6ff (diff)
downloadbusybox-fe538ba5d68391562b23d9d0902b4219b6329cad.tar.gz
busybox-fe538ba5d68391562b23d9d0902b4219b6329cad.tar.bz2
Vodz, last_patch_104
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/syslogd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index ca6aee307..a7712d445 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -56,7 +56,7 @@
/* Path to the unix socket */
static char lfile[MAXPATHLEN];
-static char *logFilePath = __LOG_FILE;
+static const char *logFilePath = __LOG_FILE;
/* interval between marks in seconds */
static int MarkInterval = 20 * 60;
@@ -588,7 +588,7 @@ extern int syslogd_main(int argc, char **argv)
doFork = FALSE;
break;
case 'O':
- logFilePath = bb_xstrdup(optarg);
+ logFilePath = optarg;
break;
#ifdef CONFIG_FEATURE_REMOTE_LOG
case 'R':
@@ -623,12 +623,13 @@ extern int syslogd_main(int argc, char **argv)
/* Store away localhost's name before the fork */
gethostname(LocalHostName, sizeof(LocalHostName));
if ((p = strchr(LocalHostName, '.'))) {
- *p++ = '\0';
+ *p = '\0';
}
umask(0);
- if ((doFork == TRUE) && (daemon(0, 1) < 0)) {
+ if (doFork == TRUE) {
+ if(daemon(0, 1) < 0)
bb_perror_msg_and_die("daemon");
#if defined(__uClinux__)
vfork_daemon_rexec(argc, argv, "-n");