summaryrefslogtreecommitdiff
path: root/source4/client/client.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-12-04 13:56:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:21 -0500
commit9112a632f6791ffc3c3c1aadd214cbaba8fe816e (patch)
tree129b941d550b15e919461dedcde286f1697ba94d /source4/client/client.c
parent4127edc1afd702ac3bcb77893ba864eb98729451 (diff)
downloadsamba-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/client/client.c')
-rw-r--r--source4/client/client.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index dae24ce927..f17586f994 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -138,8 +138,9 @@ void dos_clean_name(char *s)
write to a local file with CR/LF->LF translation if appropriate. return the
number taken from the buffer. This may not equal the number written.
****************************************************************************/
-static int writefile(int f, char *b, int n)
+static int writefile(int f, const void *_b, int n)
{
+ const uint8_t *b = _b;
int i;
if (!translation) {
@@ -165,8 +166,9 @@ static int writefile(int f, char *b, int n)
read from a file with LF->CR/LF translation if appropriate. return the
number read. read approx n bytes.
****************************************************************************/
-static int readfile(char *b, int n, XFILE *f)
+static int readfile(void *_b, int n, XFILE *f)
{
+ uint8_t *b = _b;
int i;
int c;
@@ -719,7 +721,7 @@ static int do_get(char *rname, const char *lname, BOOL reget)
{
int handle = 0, fnum;
BOOL newhandle = False;
- char *data;
+ uint8_t *data;
struct timeval tp_start;
int read_size = io_bufsize;
uint16_t attr;
@@ -775,7 +777,7 @@ static int do_get(char *rname, const char *lname, BOOL reget)
DEBUG(2,("getting file %s of size %.0f as %s ",
rname, (double)size, lname));
- if(!(data = (char *)malloc(read_size))) {
+ if(!(data = (uint8_t *)malloc(read_size))) {
d_printf("malloc fail for size %d\n", read_size);
smbcli_close(cli->tree, fnum);
return 1;
@@ -1149,7 +1151,7 @@ static int do_put(char *rname, char *lname, BOOL reput)
XFILE *f;
size_t start = 0;
off_t nread = 0;
- char *buf = NULL;
+ uint8_t *buf = NULL;
int maxwrite = io_bufsize;
int rc = 0;
@@ -1202,7 +1204,7 @@ static int do_put(char *rname, char *lname, BOOL reput)
DEBUG(1,("putting file %s as %s ",lname,
rname));
- buf = (char *)malloc(maxwrite);
+ buf = (uint8_t *)malloc(maxwrite);
if (!buf) {
d_printf("ERROR: Not enough memory!\n");
return 1;