s3:torture:delete: untangle function call from result check
authorMichael Adam <obnox@samba.org>
Wed, 8 Aug 2012 10:18:16 +0000 (12:18 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 9 Aug 2012 13:27:16 +0000 (15:27 +0200)
source3/torture/torture.c

index 1ba915a853b23a2657657e9f4fc102294571ed12..bb0f1bbfce5d463449fc97351143459f1d99003e 100644 (file)
@@ -4246,8 +4246,12 @@ static bool run_deletetest(int dummy)
                printf("eighth delete on close test succeeded.\n");
 
        /* This should fail - we need to set DELETE_ACCESS. */
-       if (NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0,FILE_READ_DATA|FILE_WRITE_DATA,
-                                  FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE, FILE_OVERWRITE_IF, FILE_DELETE_ON_CLOSE, 0, &fnum1))) {
+       status = cli_ntcreate(cli1, fname, 0, FILE_READ_DATA|FILE_WRITE_DATA,
+                             FILE_ATTRIBUTE_NORMAL,
+                             FILE_SHARE_NONE,
+                             FILE_OVERWRITE_IF,
+                             FILE_DELETE_ON_CLOSE, 0, &fnum1);
+       if (NT_STATUS_IS_OK(status)) {
                printf("[9] open of %s succeeded should have failed!\n", fname);
                correct = False;
                goto fail;