summaryrefslogtreecommitdiff
path: root/source4/torture/basic/scanner.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-06 22:28:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:55 -0500
commit2151cde58014ea2e822c13d2f8a369b45dc19ca8 (patch)
treeb0cd4c5b394e636232f417bcf482da87d1e18975 /source4/torture/basic/scanner.c
parent05e7c481465e3065effaf21b43636d6605d7c313 (diff)
downloadsamba-2151cde58014ea2e822c13d2f8a369b45dc19ca8.tar.gz
r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139510788548a874e9213d91317f83ca9)
Diffstat (limited to 'source4/torture/basic/scanner.c')
-rw-r--r--source4/torture/basic/scanner.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index f68674911f4..dd596c9ee36 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -122,7 +122,7 @@ static NTSTATUS try_trans2_len(struct smbcli_state *cli,
/****************************************************************************
check whether a trans2 opnum exists at all
****************************************************************************/
-static BOOL trans2_op_exists(struct smbcli_state *cli, int op)
+static bool trans2_op_exists(struct smbcli_state *cli, int op)
{
int data_len = 0;
int param_len = 0;
@@ -146,17 +146,17 @@ static BOOL trans2_op_exists(struct smbcli_state *cli, int op)
status2 = try_trans2(cli, op, param, data, param_len, data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_EQUAL(status1, status2)) return False;
+ if (NT_STATUS_EQUAL(status1, status2)) return false;
printf("Found op %d (status=%s)\n", op, nt_errstr(status2));
- return True;
+ return true;
}
/****************************************************************************
check for existance of a trans2 call
****************************************************************************/
-static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
+static bool scan_trans2(struct smbcli_state *cli, int op, int level,
int fnum, int dnum, int qfnum, const char *fname)
{
int data_len = 0;
@@ -173,7 +173,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
SSVAL(param, 0, level);
status = try_trans2_len(cli, "void", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a file descriptor */
param_len = 6;
@@ -182,7 +182,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
SSVAL(param, 4, 0);
status = try_trans2_len(cli, "fnum", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a quota file descriptor */
param_len = 6;
@@ -191,7 +191,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
SSVAL(param, 4, 0);
status = try_trans2_len(cli, "qfnum", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a notify style */
param_len = 6;
@@ -200,7 +200,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
SSVAL(param, 4, level);
status = try_trans2_len(cli, "notify", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a file name */
param_len = 6;
@@ -211,7 +211,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
status = try_trans2_len(cli, "fname", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a new file name */
param_len = 6;
@@ -224,7 +224,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
&rparam_len, &rdata_len);
smbcli_unlink(cli->tree, "\\newfile.dat");
smbcli_rmdir(cli->tree, "\\newfile.dat");
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try dfs style */
smbcli_mkdir(cli->tree, "\\testdir");
@@ -235,13 +235,13 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
status = try_trans2_len(cli, "dfs", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
smbcli_rmdir(cli->tree, "\\testdir");
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
- return False;
+ return false;
}
-BOOL torture_trans2_scan(struct torture_context *torture,
+bool torture_trans2_scan(struct torture_context *torture,
struct smbcli_state *cli)
{
int op, level;
@@ -292,7 +292,7 @@ BOOL torture_trans2_scan(struct torture_context *torture,
}
}
- return True;
+ return true;
}
@@ -396,7 +396,7 @@ static NTSTATUS try_nttrans_len(struct smbcli_state *cli,
/****************************************************************************
check for existance of a nttrans call
****************************************************************************/
-static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
+static bool scan_nttrans(struct smbcli_state *cli, int op, int level,
int fnum, int dnum, const char *fname)
{
int data_len = 0;
@@ -413,7 +413,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
SSVAL(param, 0, level);
status = try_nttrans_len(cli, "void", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a file descriptor */
param_len = 6;
@@ -422,7 +422,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
SSVAL(param, 4, 0);
status = try_nttrans_len(cli, "fnum", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a notify style */
@@ -432,7 +432,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
SSVAL(param, 4, level);
status = try_nttrans_len(cli, "notify", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a file name */
param_len = 6;
@@ -443,7 +443,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
status = try_nttrans_len(cli, "fname", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try with a new file name */
param_len = 6;
@@ -456,7 +456,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
&rparam_len, &rdata_len);
smbcli_unlink(cli->tree, "\\newfile.dat");
smbcli_rmdir(cli->tree, "\\newfile.dat");
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
/* try dfs style */
smbcli_mkdir(cli->tree, "\\testdir");
@@ -467,9 +467,9 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
status = try_nttrans_len(cli, "dfs", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
smbcli_rmdir(cli->tree, "\\testdir");
- if (NT_STATUS_IS_OK(status)) return True;
+ if (NT_STATUS_IS_OK(status)) return true;
- return False;
+ return false;
}
@@ -500,12 +500,12 @@ bool torture_nttrans_scan(struct torture_context *torture,
}
printf("nttrans scan finished\n");
- return True;
+ return true;
}
/* scan for valid base SMB requests */
-BOOL torture_smb_scan(struct torture_context *torture)
+bool torture_smb_scan(struct torture_context *torture)
{
static struct smbcli_state *cli;
int op;
@@ -516,7 +516,7 @@ BOOL torture_smb_scan(struct torture_context *torture)
if (op == SMBreadbraw) continue;
if (!torture_open_connection(&cli, 0)) {
- return False;
+ return false;
}
req = smbcli_request_setup(cli->tree, op, 0, 0);
@@ -551,5 +551,5 @@ BOOL torture_smb_scan(struct torture_context *torture)
printf("smb scan finished\n");
- return True;
+ return true;
}