summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-01 14:58:32 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-01 18:55:19 +1100
commitb887b69151808455ae19ce2e690f6fe336c44bb9 (patch)
treec3a41722aacb32c09c7b695044beceafcd8ff4c2 /source4
parent0a703c7fd10d8adc57f5703c697eb80a7a7202bc (diff)
downloadsamba-b887b69151808455ae19ce2e690f6fe336c44bb9.tar.gz
samba-b887b69151808455ae19ce2e690f6fe336c44bb9.tar.bz2
samba-b887b69151808455ae19ce2e690f6fe336c44bb9.zip
s4-process_model: use the static module prototyping
remove the manual prototyping of static init functions
Diffstat (limited to 'source4')
-rw-r--r--source4/smbd/process_model.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index 3d5e2ce229..1696163f99 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -103,25 +103,24 @@ _PUBLIC_ NTSTATUS register_process_model(const void *_ops)
_PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
{
- extern NTSTATUS process_model_thread_init(void);
- extern NTSTATUS process_model_standard_init(void);
- extern NTSTATUS process_model_prefork_init(void);
- extern NTSTATUS process_model_onefork_init(void);
- extern NTSTATUS process_model_single_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_process_model_MODULES_PROTO;
+ init_module_fn static_init[] = { STATIC_process_model_MODULES };
+ init_module_fn *shared_init;
static bool initialised;
- if (!initialised) {
- init_module_fn static_init[] = { STATIC_process_model_MODULES };
- init_module_fn *shared_init;
- initialised = true;
- shared_init = load_samba_modules(NULL, lp_ctx, "process_model");
-
- run_init_functions(static_init);
- run_init_functions(shared_init);
-
- talloc_free(shared_init);
+ if (initialised) {
+ return NT_STATUS_OK;
}
+ initialised = true;
+
+ shared_init = load_samba_modules(NULL, lp_ctx, "process_model");
+ run_init_functions(static_init);
+ run_init_functions(shared_init);
+
+ talloc_free(shared_init);
+
return NT_STATUS_OK;
}