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

index e3f77676f9ae4aa2098cc69db9a831bfe6f43b74..0b6f5100a06eb8ab6fcb82c20d8baab17cfe6f02 100644 (file)
@@ -3922,7 +3922,8 @@ static bool run_deletetest(int dummy)
                goto fail;
        }
 
-       if (NT_STATUS_IS_OK(cli_openx(cli1, fname, O_RDONLY, DENY_NONE, &fnum1))) {
+       status = cli_openx(cli1, fname, O_RDONLY, DENY_NONE, &fnum1);
+       if (NT_STATUS_IS_OK(status)) {
                printf("[2] open of %s succeeded should have been deleted on close !\n", fname);
                status = cli_close(cli1, fnum1);
                if (!NT_STATUS_IS_OK(status)) {