summaryrefslogtreecommitdiffstats
path: root/source/lib/talloc/talloc.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-14 12:18:44 +0000
committerAndrew Tridgell <tridge@samba.org>2006-09-14 12:18:44 +0000
commitb902addaba6a28b288e869793ea555c42eb2ed45 (patch)
treeaecc19275027d27cb75cd9cc97394db1412c899d /source/lib/talloc/talloc.c
parent357699f2019e860ff60fdbb8386b1ff2e95c09d9 (diff)
downloadsamba-b902addaba6a28b288e869793ea555c42eb2ed45.tar.gz
samba-b902addaba6a28b288e869793ea555c42eb2ed45.tar.xz
samba-b902addaba6a28b288e869793ea555c42eb2ed45.zip
r18521: implement volkers suggestion for avoiding the type punning warnings
Diffstat (limited to 'source/lib/talloc/talloc.c')
-rw-r--r--source/lib/talloc/talloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/lib/talloc/talloc.c b/source/lib/talloc/talloc.c
index 2b80594e801..d790c6c26bb 100644
--- a/source/lib/talloc/talloc.c
+++ b/source/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;