diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-12-04 13:56:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:21 -0500 |
commit | 9112a632f6791ffc3c3c1aadd214cbaba8fe816e (patch) | |
tree | 129b941d550b15e919461dedcde286f1697ba94d /source4/torture/raw/read.c | |
parent | 4127edc1afd702ac3bcb77893ba864eb98729451 (diff) | |
download | samba-9112a632f6791ffc3c3c1aadd214cbaba8fe816e.tar.gz samba-9112a632f6791ffc3c3c1aadd214cbaba8fe816e.tar.bz2 samba-9112a632f6791ffc3c3c1aadd214cbaba8fe816e.zip |
r4063: - change char * -> uint8_t in struct request_buffer
- change smbcli_read/write to take void * for the buffers to match read(2)/write(2)
all this fixes a lot of gcc-4 warnings
metze
(This used to be commit b94f92bc6637f748d6f7049f4f9a30b0b8d18a7a)
Diffstat (limited to 'source4/torture/raw/read.c')
-rw-r--r-- | source4/torture/raw/read.c | 14 |
1 files changed, 7 insertions, 7 deletions
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"; |