diff options
Diffstat (limited to 'source4/torture/raw')
-rw-r--r-- | source4/torture/raw/context.c | 6 | ||||
-rw-r--r-- | source4/torture/raw/lock.c | 4 | ||||
-rw-r--r-- | source4/torture/raw/open.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/read.c | 14 | ||||
-rw-r--r-- | source4/torture/raw/seek.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/streams.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/write.c | 14 |
7 files changed, 22 insertions, 22 deletions
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c index 7fb49c3376..d0a948c401 100644 --- a/source4/torture/raw/context.c +++ b/source4/torture/raw/context.c @@ -67,7 +67,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_close cl; int fnum; const char *fname = BASEDIR "\\test.txt"; - char c = 1; + uint8_t c = 1; printf("TESTING SESSION HANDLING\n"); @@ -208,7 +208,7 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_close cl; int fnum; const char *fname = BASEDIR "\\test.txt"; - char c = 1; + uint8_t c = 1; printf("TESTING TREE HANDLING\n"); @@ -307,7 +307,7 @@ static BOOL test_pid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) union smb_close cl; int fnum; const char *fname = BASEDIR "\\test.txt"; - char c = 1; + uint8_t c = 1; uint16_t pid1, pid2; printf("TESTING PID HANDLING\n"); diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c index 547115c9f5..478c0a5a42 100644 --- a/source4/torture/raw/lock.c +++ b/source4/torture/raw/lock.c @@ -366,7 +366,7 @@ static BOOL test_pidhigh(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) BOOL ret = True; int fnum; const char *fname = BASEDIR "\\test.txt"; - char c = 1; + uint8_t c = 1; if (!torture_setup_dir(cli, BASEDIR)) { return False; @@ -598,7 +598,7 @@ static BOOL test_changetype(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum; - char c = 0; + uint8_t c = 0; const char *fname = BASEDIR "\\test.txt"; if (!torture_setup_dir(cli, BASEDIR)) { diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index fe0d4fe4fa..a1cc76ebd8 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -33,7 +33,7 @@ enum rdwr_mode {RDWR_NONE, RDWR_RDONLY, RDWR_WRONLY, RDWR_RDWR}; */ static enum rdwr_mode check_rdwr(struct smbcli_tree *tree, int fnum) { - char c = 1; + uint8_t c = 1; BOOL can_read = (smbcli_read(tree, fnum, &c, 0, 1) == 1); BOOL can_write = (smbcli_write(tree, fnum, 0, &c, 0, 1) == 1); if ( can_read && can_write) return RDWR_RDWR; diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c index ff6d2baa2b..12818f7ba6 100644 --- a/source4/torture/raw/read.c +++ b/source4/torture/raw/read.c @@ -50,7 +50,7 @@ /* setup a random buffer based on a seed */ -static void setup_buffer(char *buf, uint_t seed, int len) +static void setup_buffer(uint8_t *buf, uint_t seed, int len) { int i; srandom(seed); @@ -60,12 +60,12 @@ static void setup_buffer(char *buf, uint_t seed, int len) /* check a random buffer based on a seed */ -static BOOL check_buffer(char *buf, uint_t seed, int len, int line) +static BOOL check_buffer(uint8_t *buf, uint_t seed, int len, int line) { int i; srandom(seed); for (i=0;i<len;i++) { - char v = random(); + uint8_t v = random(); if (buf[i] != v) { printf("Buffer incorrect at line %d! ofs=%d v1=0x%x v2=0x%x\n", line, i, buf[i], v); @@ -84,7 +84,7 @@ static BOOL test_read(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum; - char *buf; + uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; const char *test_data = "TEST DATA"; @@ -208,7 +208,7 @@ static BOOL test_lockread(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum; - char *buf; + uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; const char *test_data = "TEST DATA"; @@ -351,7 +351,7 @@ static BOOL test_readx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum; - char *buf; + uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; const char *test_data = "TEST DATA"; @@ -545,7 +545,7 @@ static BOOL test_readbraw(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum; - char *buf; + uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; const char *test_data = "TEST DATA"; diff --git a/source4/torture/raw/seek.c b/source4/torture/raw/seek.c index 10b930b18f..716a73b8f7 100644 --- a/source4/torture/raw/seek.c +++ b/source4/torture/raw/seek.c @@ -50,7 +50,7 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) BOOL ret = True; int fnum, fnum2; const char *fname = BASEDIR "\\test.txt"; - char c[2]; + uint8_t c[2]; if (!torture_setup_dir(cli, BASEDIR)) { return False; diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c index 7053f6c998..16c1bee3f1 100644 --- a/source4/torture/raw/streams.c +++ b/source4/torture/raw/streams.c @@ -50,7 +50,7 @@ static BOOL check_stream(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, { int fnum; const char *full_name; - char *buf; + uint8_t *buf; ssize_t ret; full_name = talloc_asprintf(mem_ctx, "%s:%s", fname, sname); diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c index 7def976b46..06fbe667ea 100644 --- a/source4/torture/raw/write.c +++ b/source4/torture/raw/write.c @@ -64,7 +64,7 @@ /* setup a random buffer based on a seed */ -static void setup_buffer(char *buf, uint_t seed, int len) +static void setup_buffer(uint8_t *buf, uint_t seed, int len) { int i; srandom(seed); @@ -74,12 +74,12 @@ static void setup_buffer(char *buf, uint_t seed, int len) /* check a random buffer based on a seed */ -static BOOL check_buffer(char *buf, uint_t seed, int len, const char *location) +static BOOL check_buffer(uint8_t *buf, uint_t seed, int len, const char *location) { int i; srandom(seed); for (i=0;i<len;i++) { - char v = random(); + uint8_t v = random(); if (buf[i] != v) { printf("Buffer incorrect at %s! ofs=%d buf=0x%x correct=0x%x\n", location, i, buf[i], v); @@ -98,7 +98,7 @@ static BOOL test_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum; - char *buf; + uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; uint_t seed = time(NULL); @@ -215,7 +215,7 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum, i; - char *buf; + uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; uint_t seed = time(NULL); @@ -391,7 +391,7 @@ static BOOL test_writeunlock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum; - char *buf; + uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; uint_t seed = time(NULL); @@ -528,7 +528,7 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) NTSTATUS status; BOOL ret = True; int fnum; - char *buf; + uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; uint_t seed = time(NULL); |