summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source4/utils')
-rw-r--r--source4/utils/net/net.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c
index f1bb4cef4c..b6b3fb6fb9 100644
--- a/source4/utils/net/net.c
+++ b/source4/utils/net/net.c
@@ -157,6 +157,11 @@ static int binary_net(int argc, const char **argv)
TALLOC_CTX *mem_ctx;
struct net_context *ctx;
poptContext pc;
+ struct poptOption long_options[] = {
+ {"help", 'h', POPT_ARG_NONE, 0, 'h'},
+ {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version},
+ { 0, 0, 0, 0}
+ };
setup_logging("net", DEBUG_STDOUT);
@@ -172,13 +177,7 @@ static int binary_net(int argc, const char **argv)
}
ZERO_STRUCTP(ctx);
- ctx->mem_ctx = mem_ctx;
-
- struct poptOption long_options[] = {
- {"help", 'h', POPT_ARG_NONE, 0, 'h'},
- {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version},
- { 0, 0, 0, 0}
- };
+ ctx->mem_ctx = mem_ctx;
pc = poptGetContext(NULL, argc, (const char **) argv, long_options,
POPT_CONTEXT_KEEP_FIRST);