]> sourceware.org Git - glibc.git/commitdiff
(log_cleanup): New function. (openlog): Use log_cleanup instead of __libc_mutex_unloc...
authorUlrich Drepper <drepper@redhat.com>
Fri, 6 Dec 2002 11:31:06 +0000 (11:31 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 6 Dec 2002 11:31:06 +0000 (11:31 +0000)
misc/syslog.c

index 5b3bca2679d060522a8cc5e78062a49356b90ef2..c7d92974e9cde26ba42e58810808dbfac51c15ab 100644 (file)
@@ -329,14 +329,19 @@ openlog_internal(const char *ident, int logstat, int logfac)
        }
 }
 
+
+static void
+log_cleanup (void *arg)
+{
+  __libc_lock_unlock (*(__libc_lock_t *) arg);
+}
+
 void
 openlog (const char *ident, int logstat, int logfac)
 {
 #ifdef _LIBC_REENTRANT
   /* Protect against multiple users.  */
-  __libc_cleanup_region_start (1,
-                              (void (*) __P ((void *))) __libc_mutex_unlock,
-                              &syslog_lock);
+  __libc_cleanup_region_start (1, log_cleanup, &syslog_lock);
   __libc_lock_lock (syslog_lock);
 #endif
 
@@ -370,9 +375,7 @@ closelog ()
 {
 #ifdef _LIBC_REENTRANT
   /* Protect against multiple users.  */
-  __libc_cleanup_region_start (1,
-                              (void (*) __P ((void *))) __libc_mutex_unlock,
-                              &syslog_lock);
+  __libc_cleanup_region_start (1, log_cleanup, &syslog_lock);
   __libc_lock_lock (syslog_lock);
 #endif
 
This page took 0.03926 seconds and 5 git commands to generate.