diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-10-08 14:22:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:07:59 -0500 |
commit | dae6a2453250b01079d2064bcb0cac48a2e5d1e5 (patch) | |
tree | 459bd85f6115a4b5d4f2804c82499e259d9061ca /source4/torture | |
parent | b0ef52e959265932c848a888453937162e3414ef (diff) | |
download | samba-dae6a2453250b01079d2064bcb0cac48a2e5d1e5.tar.gz samba-dae6a2453250b01079d2064bcb0cac48a2e5d1e5.tar.bz2 samba-dae6a2453250b01079d2064bcb0cac48a2e5d1e5.zip |
r25579: BOOL -> bool
metze
(This used to be commit 058a0619e9218586e73ae920f45621cf00d8b828)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/locktest2.c | 48 | ||||
-rw-r--r-- | source4/torture/nbt/browse.c | 4 | ||||
-rw-r--r-- | source4/torture/smb2/dir.c | 12 | ||||
-rw-r--r-- | source4/torture/smb2/maxwrite.c | 8 |
4 files changed, 36 insertions, 36 deletions
diff --git a/source4/torture/locktest2.c b/source4/torture/locktest2.c index 970873a3a6..55edd4aa17 100644 --- a/source4/torture/locktest2.c +++ b/source4/torture/locktest2.c @@ -24,10 +24,10 @@ static fstring password; static fstring username; static int got_pass; static int numops = 1000; -static BOOL showall; -static BOOL analyze; -static BOOL hide_unlock_fails; -static BOOL use_oplocks; +static bool showall; +static bool analyze; +static bool hide_unlock_fails; +static bool use_oplocks; #define FILENAME "\\locktest.dat" #define LOCKRANGE 100 @@ -77,7 +77,7 @@ static int try_open(struct smbcli_state *c, char *nfs, int fstype, const char *f return -1; } -static BOOL try_close(struct smbcli_state *c, int fstype, int fd) +static bool try_close(struct smbcli_state *c, int fstype, int fd) { switch (fstype) { case FSTYPE_SMB: @@ -87,10 +87,10 @@ static BOOL try_close(struct smbcli_state *c, int fstype, int fd) return close(fd) == 0; } - return False; + return false; } -static BOOL try_lock(struct smbcli_state *c, int fstype, +static bool try_lock(struct smbcli_state *c, int fstype, int fd, uint_t start, uint_t len, enum brl_type op) { @@ -109,10 +109,10 @@ static BOOL try_lock(struct smbcli_state *c, int fstype, return fcntl(fd,F_SETLK,&lock) == 0; } - return False; + return false; } -static BOOL try_unlock(struct smbcli_state *c, int fstype, +static bool try_unlock(struct smbcli_state *c, int fstype, int fd, uint_t start, uint_t len) { struct flock lock; @@ -130,7 +130,7 @@ static BOOL try_unlock(struct smbcli_state *c, int fstype, return fcntl(fd,F_SETLK,&lock) == 0; } - return False; + return false; } /***************************************************** @@ -207,7 +207,7 @@ static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], -static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], +static bool test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], char *nfs[NSERVERS], int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES], struct record *rec) @@ -221,7 +221,7 @@ static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], uint_t r2 = rec->r2; enum brl_type op; int server; - BOOL ret[NSERVERS]; + bool ret[NSERVERS]; if (r1 < READ_PCT) { op = READ_LOCK; @@ -243,7 +243,7 @@ static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], op==READ_LOCK?"READ_LOCK":"WRITE_LOCK", ret[0], ret[1]); } - if (ret[0] != ret[1]) return False; + if (ret[0] != ret[1]) return false; } else if (r2 < LOCK_PCT+UNLOCK_PCT) { /* unset a lock */ for (server=0;server<NSERVERS;server++) { @@ -257,7 +257,7 @@ static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], start, start+len-1, len, ret[0], ret[1]); } - if (!hide_unlock_fails && ret[0] != ret[1]) return False; + if (!hide_unlock_fails && ret[0] != ret[1]) return false; } else { /* reopen the file */ for (server=0;server<NSERVERS;server++) { @@ -266,7 +266,7 @@ static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], O_RDWR|O_CREAT); if (fnum[server][fstype][conn][f] == -1) { printf("failed to reopen on share1\n"); - return False; + return false; } } if (showall) { @@ -274,7 +274,7 @@ static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], conn, fstype, f); } } - return True; + return true; } static void close_files(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], @@ -369,7 +369,7 @@ static void test_locks(char *share1, char *share2, char *nfspath1, char *nfspath recorded[n].len *= RANGE_MULTIPLE; recorded[n].r1 = random() % 100; recorded[n].r2 = random() % 100; - recorded[n].needed = True; + recorded[n].needed = true; } reconnect(cli, nfs, fnum, share1, share2); @@ -388,14 +388,14 @@ static void test_locks(char *share1, char *share2, char *nfspath1, char *nfspath for (i=0;i<n-1;i++) { int m; - recorded[i].needed = False; + recorded[i].needed = false; close_files(cli, nfs, fnum); open_files(cli, nfs, fnum); m = retest(cli, nfs, fnum, n); if (m == n) { - recorded[i].needed = True; + recorded[i].needed = true; } else { if (i < m) { memmove(&recorded[i], &recorded[i+1], @@ -412,7 +412,7 @@ static void test_locks(char *share1, char *share2, char *nfspath1, char *nfspath close_files(cli, nfs, fnum); reconnect(cli, nfs, fnum, share1, share2); open_files(cli, nfs, fnum); - showall = True; + showall = true; n1 = retest(cli, nfs, fnum, n); if (n1 != n-1) { printf("ERROR - inconsistent result (%u %u)\n", n1, n); @@ -506,19 +506,19 @@ static void usage(void) seed = atoi(optarg); break; case 'u': - hide_unlock_fails = True; + hide_unlock_fails = true; break; case 'o': numops = atoi(optarg); break; case 'O': - use_oplocks = True; + use_oplocks = true; break; case 'a': - showall = True; + showall = true; break; case 'A': - analyze = True; + analyze = true; break; case 'h': usage(); diff --git a/source4/torture/nbt/browse.c b/source4/torture/nbt/browse.c index a9aac79469..e609e72055 100644 --- a/source4/torture/nbt/browse.c +++ b/source4/torture/nbt/browse.c @@ -33,7 +33,7 @@ bool torture_nbt_browse(struct torture_context *torture) struct nbt_name name; TALLOC_CTX *mem_ctx = talloc_new(NULL); NTSTATUS status; - BOOL ret = True; + bool ret = true; name.name = lp_workgroup(); name.type = NBT_NAME_BROWSER; @@ -45,7 +45,7 @@ bool torture_nbt_browse(struct torture_context *torture) printf("Failed to resolve %s - %s\n", name.name, nt_errstr(status)); talloc_free(mem_ctx); - return False; + return false; } talloc_free(mem_ctx); diff --git a/source4/torture/smb2/dir.c b/source4/torture/smb2/dir.c index 428683522a..eb24dd0884 100644 --- a/source4/torture/smb2/dir.c +++ b/source4/torture/smb2/dir.c @@ -29,19 +29,19 @@ /* test find continue */ -static BOOL torture_smb2_find_dir(struct smb2_tree *tree) +static bool torture_smb2_find_dir(struct smb2_tree *tree) { struct smb2_handle handle; NTSTATUS status; int i; struct smb2_find f; - BOOL ret = True; + bool ret = true; union smb_search_data *d; uint_t count; status = smb2_util_roothandle(tree, &handle); if (!NT_STATUS_IS_OK(status)) { - return False; + return false; } ZERO_STRUCT(f); @@ -75,14 +75,14 @@ static BOOL torture_smb2_find_dir(struct smb2_tree *tree) /* basic testing of directory listing with continue */ -BOOL torture_smb2_dir(struct torture_context *torture) +bool torture_smb2_dir(struct torture_context *torture) { TALLOC_CTX *mem_ctx = talloc_new(NULL); struct smb2_tree *tree; - BOOL ret = True; + bool ret = true; if (!torture_smb2_connection(mem_ctx, &tree)) { - return False; + return false; } ret &= torture_smb2_find_dir(tree); diff --git a/source4/torture/smb2/maxwrite.c b/source4/torture/smb2/maxwrite.c index d4a77ad3ca..588a49221e 100644 --- a/source4/torture/smb2/maxwrite.c +++ b/source4/torture/smb2/maxwrite.c @@ -111,7 +111,7 @@ static NTSTATUS torture_smb2_write(TALLOC_CTX *mem_ctx, /* basic testing of SMB2 connection calls */ -BOOL torture_smb2_maxwrite(struct torture_context *torture) +bool torture_smb2_maxwrite(struct torture_context *torture) { TALLOC_CTX *mem_ctx = talloc_new(NULL); struct smb2_tree *tree; @@ -119,17 +119,17 @@ BOOL torture_smb2_maxwrite(struct torture_context *torture) NTSTATUS status; if (!torture_smb2_connection(mem_ctx, &tree)) { - return False; + return false; } h1 = torture_smb2_create(tree, FNAME); status = torture_smb2_write(mem_ctx, tree, h1); if (!NT_STATUS_IS_OK(status)) { printf("Write failed - %s\n", nt_errstr(status)); - return False; + return false; } talloc_free(mem_ctx); - return True; + return true; } |