summaryrefslogtreecommitdiff
path: root/source4/libcli/clireadwrite.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/libcli/clireadwrite.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/libcli/clireadwrite.c')
-rw-r--r--source4/libcli/clireadwrite.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/libcli/clireadwrite.c b/source4/libcli/clireadwrite.c
index 6b6cb2f2a2..4248ac4286 100644
--- a/source4/libcli/clireadwrite.c
+++ b/source4/libcli/clireadwrite.c
@@ -25,9 +25,10 @@
/****************************************************************************
Read size bytes at offset offset using SMBreadX.
****************************************************************************/
-ssize_t smbcli_read(struct smbcli_tree *tree, int fnum, char *buf, off_t offset,
+ssize_t smbcli_read(struct smbcli_tree *tree, int fnum, void *_buf, off_t offset,
size_t size)
{
+ uint8_t *buf = _buf;
union smb_read parms;
int readsize;
ssize_t total = 0;
@@ -84,8 +85,9 @@ ssize_t smbcli_read(struct smbcli_tree *tree, int fnum, char *buf, off_t offset,
****************************************************************************/
ssize_t smbcli_write(struct smbcli_tree *tree,
int fnum, uint16_t write_mode,
- const uint8_t *buf, off_t offset, size_t size)
+ const void *_buf, off_t offset, size_t size)
{
+ const uint8_t *buf = _buf;
union smb_write parms;
int block = (tree->session->transport->negotiate.max_xmit - (MIN_SMB_SIZE+32));
ssize_t total = 0;
@@ -129,8 +131,9 @@ ssize_t smbcli_write(struct smbcli_tree *tree,
write to a file using a SMBwrite and not bypassing 0 byte writes
****************************************************************************/
ssize_t smbcli_smbwrite(struct smbcli_tree *tree,
- int fnum, char *buf, off_t offset, size_t size1)
+ int fnum, const void *_buf, off_t offset, size_t size1)
{
+ const uint8_t *buf = _buf;
union smb_write parms;
ssize_t total = 0;