diff options
author | brian <brian@FreeBSD.org> | 1998-05-01 19:41:12 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-05-01 19:41:12 +0000 |
commit | 42e084c2b10f7f3c72bada9830807258e56855ac (patch) | |
tree | 6c3f7dcd3829bbba64ed98935daa192b8cbb66ec /lib/libc/gen | |
parent | 47edcaa2b6698dda1fd3c322bac557e3c0c8b8e2 (diff) | |
download | FreeBSD-src-42e084c2b10f7f3c72bada9830807258e56855ac.zip FreeBSD-src-42e084c2b10f7f3c72bada9830807258e56855ac.tar.gz |
Go back to version 1.16 - it was correct the way it was.
Pointed out by: bde
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/syslog.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index a55bfa6..e8890f2 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -61,7 +61,7 @@ static const char rcsid[] = #endif static int LogFile = -1; /* fd for log */ -static int connected = -1; /* have done connect */ +static int connected; /* have done connect */ static int opened; /* have done openlog() */ static int LogStat = 0; /* status bits, set by openlog() */ static const char *LogTag = NULL; /* string to tag the entry with */ @@ -286,7 +286,7 @@ disconnectlog() close(LogFile); LogFile = -1; } - connected = -1; /* retry connect */ + connected = 0; /* retry connect */ } static void @@ -299,7 +299,7 @@ connectlog() return; (void)fcntl(LogFile, F_SETFD, 1); } - if (LogFile != -1 && connected == -1) { + if (LogFile != -1 && !connected) { SyslogAddr.sun_len = sizeof(SyslogAddr); SyslogAddr.sun_family = AF_UNIX; (void)strncpy(SyslogAddr.sun_path, _PATH_LOG, @@ -307,7 +307,7 @@ connectlog() connected = connect(LogFile, (struct sockaddr *)&SyslogAddr, sizeof(SyslogAddr)) != -1; - if (connected == -1) { + if (!connected) { /* * Try the old "/dev/log" path, for backward * compatibility. @@ -319,7 +319,7 @@ connectlog() sizeof(SyslogAddr)) != -1; } - if (connected == -1) { + if (!connected) { (void)close(LogFile); LogFile = -1; } @@ -348,7 +348,7 @@ closelog() { (void)close(LogFile); LogFile = -1; - connected = -1; + connected = 0; } /* setlogmask -- set the log mask level */ |