From 4a03172e66694b51a24f7b5566f361c1f1767e29 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 16 Jan 2005 23:23:45 +0000 Subject: 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) --- source4/libcli/composite/savefile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/libcli/composite/savefile.c') 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 */ -- cgit