diff options
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/syslogd.c | 9 |
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 @@ | |||
56 | /* Path to the unix socket */ | 56 | /* Path to the unix socket */ |
57 | static char lfile[MAXPATHLEN]; | 57 | static char lfile[MAXPATHLEN]; |
58 | 58 | ||
59 | static char *logFilePath = __LOG_FILE; | 59 | static const char *logFilePath = __LOG_FILE; |
60 | 60 | ||
61 | /* interval between marks in seconds */ | 61 | /* interval between marks in seconds */ |
62 | static int MarkInterval = 20 * 60; | 62 | static int MarkInterval = 20 * 60; |
@@ -588,7 +588,7 @@ extern int syslogd_main(int argc, char **argv) | |||
588 | doFork = FALSE; | 588 | doFork = FALSE; |
589 | break; | 589 | break; |
590 | case 'O': | 590 | case 'O': |
591 | logFilePath = bb_xstrdup(optarg); | 591 | logFilePath = optarg; |
592 | break; | 592 | break; |
593 | #ifdef CONFIG_FEATURE_REMOTE_LOG | 593 | #ifdef CONFIG_FEATURE_REMOTE_LOG |
594 | case 'R': | 594 | case 'R': |
@@ -623,12 +623,13 @@ extern int syslogd_main(int argc, char **argv) | |||
623 | /* Store away localhost's name before the fork */ | 623 | /* Store away localhost's name before the fork */ |
624 | gethostname(LocalHostName, sizeof(LocalHostName)); | 624 | gethostname(LocalHostName, sizeof(LocalHostName)); |
625 | if ((p = strchr(LocalHostName, '.'))) { | 625 | if ((p = strchr(LocalHostName, '.'))) { |
626 | *p++ = '\0'; | 626 | *p = '\0'; |
627 | } | 627 | } |
628 | 628 | ||
629 | umask(0); | 629 | umask(0); |
630 | 630 | ||
631 | if ((doFork == TRUE) && (daemon(0, 1) < 0)) { | 631 | if (doFork == TRUE) { |
632 | if(daemon(0, 1) < 0) | ||
632 | bb_perror_msg_and_die("daemon"); | 633 | bb_perror_msg_and_die("daemon"); |
633 | #if defined(__uClinux__) | 634 | #if defined(__uClinux__) |
634 | vfork_daemon_rexec(argc, argv, "-n"); | 635 | vfork_daemon_rexec(argc, argv, "-n"); |