lib/util: Use only init_module_fn typedef in module loading
authorAndrew Bartlett <abartlet@samba.org>
Fri, 9 Sep 2011 12:18:42 +0000 (22:18 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 6 Oct 2011 05:18:07 +0000 (07:18 +0200)
lib/util/modules.c
lib/util/samba_modules.h

index 5af7fa98d0d1441a846720a1c26b5d79a751e68e..620611ff176d10d998ba545cb63b16d04202c8f0 100644 (file)
@@ -136,7 +136,7 @@ init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, const char *subsystem)
 static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
 {
        void *handle;
-       init_module_function *init;
+       init_module_finit;
        NTSTATUS status;
        const char *error;
 
@@ -156,7 +156,7 @@ static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
                return NT_STATUS_UNSUCCESSFUL;
        }
 
-       init = (init_module_function *)dlsym(handle, "init_samba_module");
+       init = (init_module_fn)dlsym(handle, "init_samba_module");
 
        /* we must check dlerror() to determine if it worked, because
            dlsym() can validly return NULL */
index df24eb7621e23a0d23f4c29650c768b5202145c8..06f92c5db1a923de48f7b25b237a534cebe96936 100644 (file)
@@ -22,7 +22,6 @@
 #define _SAMBA_MODULES_H
 
 /* Module support */
-typedef NTSTATUS (init_module_function) (void);
 typedef NTSTATUS (*init_module_fn) (void);
 
 NTSTATUS init_samba_module(void);