uxlsnr: use typedef for trigger function
authorHannes Reinecke <hare@suse.de>
Wed, 20 Aug 2014 09:19:05 +0000 (11:19 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 29 Mar 2015 16:12:36 +0000 (18:12 +0200)
Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd/uxlsnr.c
multipathd/uxlsnr.h

index 7b13190..550dcc4 100644 (file)
@@ -119,8 +119,7 @@ void uxsock_cleanup(void *arg)
 /*
  * entry point
  */
-void * uxsock_listen(int (*uxsock_trigger)(char *, char **, int *, void *),
-                       void * trigger_data)
+void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, void * trigger_data)
 {
        int ux_sock;
        size_t len;
index 8b5a525..d274b04 100644 (file)
@@ -1,11 +1,13 @@
 #ifndef _UXLSNR_H
 #define _UXLSNR_H
 
-void * uxsock_listen(int (*uxsock_trigger)
-                       (char *, char **, int *, void *),
-                       void * trigger_data);
+typedef int (uxsock_trigger_fn)(char *, char **, int *, void *);
+
+void * uxsock_listen(uxsock_trigger_fn uxsock_trigger,
+                    void * trigger_data);
 
 extern volatile sig_atomic_t reconfig_sig;
 extern volatile sig_atomic_t log_reset_sig;
+
 #endif