summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-21 23:19:23 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-21 23:35:58 +0200
commitbd3e70c1bea906e942755cedfbcb467356b2a483 (patch)
tree5d48b0ed093dcb4e257eb9f4424464ede3e2eff0
parenta05ac3039b34f07b730b673c3b2c1a0a923cbd35 (diff)
downloadsamba-bd3e70c1bea906e942755cedfbcb467356b2a483.tar.gz
samba-bd3e70c1bea906e942755cedfbcb467356b2a483.tar.bz2
samba-bd3e70c1bea906e942755cedfbcb467356b2a483.zip
s4:torture/raw/open.c - remove unused variables and fix error handling
-rw-r--r--source4/torture/raw/open.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 42f693e78c..c8494ab22b 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -1882,13 +1882,10 @@ static bool test_ntcreatexdir(struct torture_context *tctx,
struct smbcli_state *cli)
{
union smb_open io;
- union smb_fileinfo finfo;
const char *fname = BASEDIR "\\torture_ntcreatex.txt";
const char *dname = BASEDIR "\\torture_ntcreatex_dir";
- NTSTATUS status, expected_status;
- bool ret = true;
+ NTSTATUS status;
int i;
- uint32_t access_mask = 0;
struct {
uint32_t open_disp;
@@ -1955,7 +1952,7 @@ static bool test_ntcreatexdir(struct torture_context *tctx,
__location__, nt_errstr(status),
nt_errstr(open_funcs[i].correct_status),
i, (int)open_funcs[i].open_disp);
- ret = false;
+ return false;
}
/* Close and delete the file. */
if (NT_STATUS_IS_OK(status)) {
@@ -2063,11 +2060,9 @@ static bool test_ntcreatexdir(struct torture_context *tctx,
"NTCREATEX_OPTIONS_NON_DIRECTORY_FILE should be returned ");
smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
-done:
- smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
smbcli_deltree(cli->tree, BASEDIR);
- return ret;
+ return true;
}
/* basic testing of all RAW_OPEN_* calls