aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-10-22 21:45:13 +0000
committerUlrich Drepper <drepper@redhat.com>2008-10-22 21:45:13 +0000
commit208bc8367015221e38ffaef9fccbafd68e3fff48 (patch)
tree4ffce2fd5fd509f3f5bbeb93da24c6a62d751a00 /misc
parent60a23f5a729ce088fb34c42d2c536e0ef6e7fb07 (diff)
downloadglibc-208bc8367015221e38ffaef9fccbafd68e3fff48.zip
glibc-208bc8367015221e38ffaef9fccbafd68e3fff48.tar.gz
glibc-208bc8367015221e38ffaef9fccbafd68e3fff48.tar.bz2
* misc/syslog.c (openlog_internal): Fix __have_sock_cloexec
initialization.
Diffstat (limited to 'misc')
-rw-r--r--misc/syslog.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/misc/syslog.c b/misc/syslog.c
index 8f84faf..90cd3bf 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -358,10 +358,11 @@ openlog_internal(const char *ident, int logstat, int logfac)
# ifndef __ASSUME_SOCK_CLOEXEC
if (__have_sock_cloexec == 0)
__have_sock_cloexec
- = (LogFile != -1
- || errno != EINVAL);
+ = ((LogFile != -1
+ || errno != EINVAL)
+ ? 1 : -1);
}
-#endif
+# endif
#endif
#ifndef __ASSUME_SOCK_CLOEXEC
# ifdef SOCK_CLOEXEC