summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-03 14:37:36 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-03 14:37:36 +0000
commit8aeac64e83a54961ba5ca5228ab1c2669acc1f12 (patch)
tree310bf087edfb81d0f6583daba0428c290c16de75 /libc
parent98d631495c98fd7d3b1ba2f93c71c7e210450a8c (diff)
syslog.c: fix a buglet in prev-last commit: logic inversion in closelog
Diffstat (limited to 'libc')
-rw-r--r--libc/misc/syslog/syslog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/misc/syslog/syslog.c b/libc/misc/syslog/syslog.c
index be1a88b7f..05664e643 100644
--- a/libc/misc/syslog/syslog.c
+++ b/libc/misc/syslog/syslog.c
@@ -135,7 +135,7 @@ closelog_intern(int sig)
}
LogFile = -1;
connected = 0;
- if (sig != 0) {
+ if (sig == 0) { /* called from closelog()? - reset to defaults */
LogStat = 0;
LogTag = "syslog";
LogFacility = LOG_USER;
@@ -287,7 +287,7 @@ vsyslog(int pri, const char *fmt, va_list ap)
/* I don't think looping forever on EAGAIN is a good idea.
* Imagine that syslogd is SIGSTOPed... */
if (/* (errno != EAGAIN) && */ (errno != EINTR)) {
- closelog_intern(1); /* 1: reset LogXXX globals to default */
+ closelog_intern(1); /* 1: do not reset LogXXX globals to default */
goto write_err;
}
rc = 0;
@@ -338,7 +338,7 @@ libc_hidden_def(syslog)
void
closelog(void)
{
- closelog_intern(0); /* 0: do not reset LogXXX globals to default */
+ closelog_intern(0); /* 0: reset LogXXX globals to default */
}
libc_hidden_def(closelog)