summaryrefslogtreecommitdiff
path: root/source4/libcli/composite/savefile.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-16 23:23:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:55 -0500
commit4a03172e66694b51a24f7b5566f361c1f1767e29 (patch)
treec29ddb9ce94d84c8c6bcba7e0ea86a2fb4524c89 /source4/libcli/composite/savefile.c
parent7b79694eadc288592729567c3caa7c70f6662760 (diff)
downloadsamba-4a03172e66694b51a24f7b5566f361c1f1767e29.tar.gz
samba-4a03172e66694b51a24f7b5566f361c1f1767e29.tar.bz2
samba-4a03172e66694b51a24f7b5566f361c1f1767e29.zip
r4791: used the new talloc type safety macros to make the "void *private"
pointers in the composite code type safe. This is a bit of an experiement, I'd be interested in comments on whether we should use this more widely. (This used to be commit 0e1da827b380998355f75f4ef4f424802059c278)
Diffstat (limited to 'source4/libcli/composite/savefile.c')
-rw-r--r--source4/libcli/composite/savefile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/libcli/composite/savefile.c b/source4/libcli/composite/savefile.c
index f516939c2b..06eb13bb01 100644
--- a/source4/libcli/composite/savefile.c
+++ b/source4/libcli/composite/savefile.c
@@ -47,7 +47,7 @@ struct savefile_state {
static NTSTATUS setup_close(struct smbcli_composite *c,
struct smbcli_tree *tree, uint16_t fnum)
{
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
union smb_close *io_close;
/* nothing to write, setup the close */
@@ -76,7 +76,7 @@ static NTSTATUS setup_close(struct smbcli_composite *c,
static NTSTATUS savefile_open(struct smbcli_composite *c,
struct smb_composite_savefile *io)
{
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
union smb_write *io_write;
struct smbcli_tree *tree = state->req->tree;
NTSTATUS status;
@@ -122,7 +122,7 @@ static NTSTATUS savefile_open(struct smbcli_composite *c,
static NTSTATUS savefile_write(struct smbcli_composite *c,
struct smb_composite_savefile *io)
{
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
struct smbcli_tree *tree = state->req->tree;
NTSTATUS status;
uint32_t max_xmit = tree->session->transport->negotiate.max_xmit;
@@ -160,7 +160,7 @@ static NTSTATUS savefile_write(struct smbcli_composite *c,
static NTSTATUS savefile_close(struct smbcli_composite *c,
struct smb_composite_savefile *io)
{
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
NTSTATUS status;
status = smbcli_request_simple_recv(state->req);
@@ -185,7 +185,7 @@ static NTSTATUS savefile_close(struct smbcli_composite *c,
static void savefile_handler(struct smbcli_request *req)
{
struct smbcli_composite *c = req->async.private;
- struct savefile_state *state = c->private;
+ struct savefile_state *state = talloc_get_type(c->private, struct savefile_state);
/* when this handler is called, the stage indicates what
call has just finished */