summaryrefslogtreecommitdiff
path: root/sysklogd/syslogd.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik"2005-10-15 14:24:01 +0000
committer"Vladimir N. Oleynik"2005-10-15 14:24:01 +0000
commitd3d829aaf0fb1fd0d38402a77a310debde2829bf (patch)
tree8bba1fb9875206c120ac6afbb7c1e678ee16befc /sysklogd/syslogd.c
parent94c3331d47ae08167e5122a3023ffc3340274698 (diff)
downloadbusybox-d3d829aaf0fb1fd0d38402a77a310debde2829bf.zip
busybox-d3d829aaf0fb1fd0d38402a77a310debde2829bf.tar.gz
20 bytes data to bss
Diffstat (limited to 'sysklogd/syslogd.c')
-rw-r--r--sysklogd/syslogd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index e754806..3d94069 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -319,9 +319,8 @@ static void message(char *fmt, ...)
} else
#endif
- if ((fd =
- device_open(logFilePath,
- O_WRONLY | O_CREAT | O_NOCTTY | O_APPEND |
+ if ((fd = device_open(logFilePath,
+ O_WRONLY | O_CREAT | O_NOCTTY | O_APPEND |
O_NONBLOCK)) >= 0) {
fl.l_type = F_WRLCK;
fcntl(fd, F_SETLKW, &fl);
@@ -363,8 +362,7 @@ static void message(char *fmt, ...)
close(fd);
} else {
/* Always send console messages to /dev/console so people will see them. */
- if ((fd =
- device_open(_PATH_CONSOLE,
+ if ((fd = device_open(_PATH_CONSOLE,
O_WRONLY | O_NOCTTY | O_NONBLOCK)) >= 0) {
va_start(arguments, fmt);
vdprintf(fd, fmt, arguments);
@@ -400,7 +398,7 @@ static void logMessage(int pri, char *msg)
{
time_t now;
char *timestamp;
- static char res[20] = "";
+ static char res[20];
#ifdef CONFIG_FEATURE_REMOTE_LOG
static char line[MAXLINE + 1];
#endif