make sure lp_ctx is initialised
authorAndrew Tridgell <tridge@samba.org>
Fri, 15 Feb 2008 04:52:52 +0000 (15:52 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 15 Feb 2008 04:52:52 +0000 (15:52 +1100)
(This used to be commit 3abb33c8bff9aac8ba1ba4783b919732e5159283)

source4/torture/locktest.c

index de25c0abc8365853ca6502b48ded3e6b87198ed5..039484a8cbfd3d9fa313282736c9b3468ab3e8ba 100644 (file)
@@ -528,7 +528,7 @@ static int test_locks(struct loadparm_context *lp_ctx, char *share[NSERVERS])
 
 
 
-_NORETURN_ static void usage(poptContext pc)
+static void usage(poptContext pc)
 {
        printf("Usage:\n\tlocktest //server1/share1 //server2/share2 [options..]\n");
        poptPrintUsage(pc, stdout, 0);
@@ -578,6 +578,7 @@ _NORETURN_ static void usage(poptContext pc)
 
        poptSetOtherOptionHelp(pc, "<unc1> <unc2>");
 
+       lp_ctx = cmdline_lp_ctx;
        servers[0] = cli_credentials_init(talloc_autofree_context());
        servers[1] = cli_credentials_init(talloc_autofree_context());
        cli_credentials_guess(servers[0], lp_ctx);