diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-16 23:23:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:55 -0500 |
commit | 4a03172e66694b51a24f7b5566f361c1f1767e29 (patch) | |
tree | c29ddb9ce94d84c8c6bcba7e0ea86a2fb4524c89 /source4/libcli/composite/loadfile.c | |
parent | 7b79694eadc288592729567c3caa7c70f6662760 (diff) | |
download | samba-4a03172e66694b51a24f7b5566f361c1f1767e29.tar.gz samba-4a03172e66694b51a24f7b5566f361c1f1767e29.tar.xz 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/loadfile.c')
-rw-r--r-- | source4/libcli/composite/loadfile.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/libcli/composite/loadfile.c b/source4/libcli/composite/loadfile.c index 2d38096c88..8290876224 100644 --- a/source4/libcli/composite/loadfile.c +++ b/source4/libcli/composite/loadfile.c @@ -45,7 +45,7 @@ struct loadfile_state { static NTSTATUS setup_close(struct smbcli_composite *c, struct smbcli_tree *tree, uint16_t fnum) { - struct loadfile_state *state = c->private; + struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); union smb_close *io_close; /* nothing to read, setup the close */ @@ -74,7 +74,7 @@ static NTSTATUS setup_close(struct smbcli_composite *c, static NTSTATUS loadfile_open(struct smbcli_composite *c, struct smb_composite_loadfile *io) { - struct loadfile_state *state = c->private; + struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); struct smbcli_tree *tree = state->req->tree; NTSTATUS status; @@ -128,7 +128,7 @@ static NTSTATUS loadfile_open(struct smbcli_composite *c, static NTSTATUS loadfile_read(struct smbcli_composite *c, struct smb_composite_loadfile *io) { - struct loadfile_state *state = c->private; + struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); struct smbcli_tree *tree = state->req->tree; NTSTATUS status; @@ -162,7 +162,7 @@ static NTSTATUS loadfile_read(struct smbcli_composite *c, static NTSTATUS loadfile_close(struct smbcli_composite *c, struct smb_composite_loadfile *io) { - struct loadfile_state *state = c->private; + struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); NTSTATUS status; status = smbcli_request_simple_recv(state->req); @@ -183,7 +183,7 @@ static NTSTATUS loadfile_close(struct smbcli_composite *c, static void loadfile_handler(struct smbcli_request *req) { struct smbcli_composite *c = req->async.private; - struct loadfile_state *state = c->private; + struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); /* when this handler is called, the stage indicates what call has just finished */ @@ -271,7 +271,7 @@ NTSTATUS smb_composite_loadfile_recv(struct smbcli_composite *c, TALLOC_CTX *mem status = smb_composite_wait(c); if (NT_STATUS_IS_OK(status)) { - struct loadfile_state *state = c->private; + struct loadfile_state *state = talloc_get_type(c->private, struct loadfile_state); talloc_steal(mem_ctx, state->io->out.data); } |