summaryrefslogtreecommitdiff
path: root/source3/torture/masktest.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-30 15:26:43 -0700
committerJeremy Allison <jra@samba.org>2009-04-30 15:26:43 -0700
commit8cf78ff55312768d0b454b1d7e0560e04e6296da (patch)
tree0a2180f063e3bb9872c2565c92075dfb5dccac81 /source3/torture/masktest.c
parentab4b8c9c0438bc5afca17e3ebf05dde6f98bc0aa (diff)
downloadsamba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.gz
samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.bz2
samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.zip
Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions. This is smaller than it looks, it just fixes a lot of old code. Next up, ensure all cli_XX functions return NTSTATUS. Jeremy.
Diffstat (limited to 'source3/torture/masktest.c')
-rw-r--r--source3/torture/masktest.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index e80f9cd665..768323b9f7 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -311,7 +311,7 @@ static void get_real_name(struct cli_state *cli,
static void testpair(struct cli_state *cli, const char *mask, const char *file)
{
- int fnum;
+ uint16_t fnum;
fstring res1;
char *res2;
static int count;
@@ -322,8 +322,7 @@ static void testpair(struct cli_state *cli, const char *mask, const char *file)
fstrcpy(res1, "---");
- fnum = cli_open(cli, file, O_CREAT|O_TRUNC|O_RDWR, 0);
- if (fnum == -1) {
+ if (!NT_STATUS_IS_OK(cli_open(cli, file, O_CREAT|O_TRUNC|O_RDWR, 0, &fnum))) {
DEBUG(0,("Can't create %s\n", file));
return;
}