summaryrefslogtreecommitdiff
path: root/source4/lib/talloc/talloc.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-14 12:18:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:41 -0500
commitc902a8927c517f1d8c8c5e083db48fd797ece8f4 (patch)
tree54009e19c72e5abed38758270b99eb0e3eda7b77 /source4/lib/talloc/talloc.c
parenteb9a2757ebc2824a13dd5165a8aa63b0c68eac0f (diff)
downloadsamba-c902a8927c517f1d8c8c5e083db48fd797ece8f4.tar.gz
samba-c902a8927c517f1d8c8c5e083db48fd797ece8f4.tar.bz2
samba-c902a8927c517f1d8c8c5e083db48fd797ece8f4.zip
r18521: implement volkers suggestion for avoiding the type punning warnings
(This used to be commit 9b9f058edb033c999c4430add4f05459ac43c9e2)
Diffstat (limited to 'source4/lib/talloc/talloc.c')
-rw-r--r--source4/lib/talloc/talloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index 2b80594e80..d790c6c26b 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -741,8 +741,9 @@ void *_talloc_steal(const void *new_ctx, const void *ptr)
a wrapper around talloc_steal() for situations where you are moving a pointer
between two structures, and want the old pointer to be set to NULL
*/
-void *_talloc_move(const void *new_ctx, const void **pptr)
+void *_talloc_move(const void *new_ctx, const void *_pptr)
{
+ const void **pptr = (const void **)_pptr;
void *ret = _talloc_steal(new_ctx, *pptr);
(*pptr) = NULL;
return ret;