aboutsummaryrefslogtreecommitdiff
path: root/sysklogd
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-09-08 17:31:55 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-09-08 17:31:55 +0000
commitbd8f43dbab871d19484887556632af50749786b6 (patch)
treeaff74eaa70da2da4ea68915687eeb354df2f74da /sysklogd
parent9a9edf200b797a92380b634d57dec6cd9410919f (diff)
downloadbusybox-bd8f43dbab871d19484887556632af50749786b6.tar.gz
few random readability enhansements. No code changes
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/syslogd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index a8b52b36e..f3de04653 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -277,9 +277,9 @@ static void message(char *fmt, ...)
} else
#endif
- if ((fd = device_open(logFilePath,
- O_WRONLY | O_CREAT | O_NOCTTY | O_APPEND |
- O_NONBLOCK)) >= 0) {
+ fd = device_open(logFilePath, O_WRONLY | O_CREAT
+ | O_NOCTTY | O_APPEND | O_NONBLOCK);
+ if (fd >= 0) {
fl.l_type = F_WRLCK;
fcntl(fd, F_SETLKW, &fl);
@@ -291,7 +291,8 @@ static void message(char *fmt, ...)
&& (lseek(fd,0,SEEK_END) > logFileSize) ) {
if(logFileRotate > 0) {
int i;
- char oldFile[(strlen(logFilePath)+4)], newFile[(strlen(logFilePath)+4)];
+ char oldFile[(strlen(logFilePath)+4)];
+ char newFile[(strlen(logFilePath)+4)];
for(i=logFileRotate-1;i>0;i--) {
sprintf(oldFile, "%s.%d", logFilePath, i-1);
sprintf(newFile, "%s.%d", logFilePath, i);
@@ -321,8 +322,8 @@ 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,
- O_WRONLY | O_NOCTTY | O_NONBLOCK)) >= 0) {
+ fd = device_open(_PATH_CONSOLE, O_WRONLY | O_NOCTTY | O_NONBLOCK);
+ if (fd >= 0) {
va_start(arguments, fmt);
vdprintf(fd, fmt, arguments);
va_end(arguments);