summaryrefslogtreecommitdiff
path: root/source4/lib/util/util.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-04 16:02:17 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-04 16:02:17 +0200
commit30ccc36b8d61f2d09c3f0adeec4db0ab540619b8 (patch)
tree740fd5c06ebffb4991ede45182447d317603d115 /source4/lib/util/util.c
parentadc09857420c4a9306148e8d15ff5faf633ba7a5 (diff)
parentc26387a473fd26ac51c74c001b520d7fd7d353ec (diff)
downloadsamba-30ccc36b8d61f2d09c3f0adeec4db0ab540619b8.tar.gz
samba-30ccc36b8d61f2d09c3f0adeec4db0ab540619b8.tar.bz2
samba-30ccc36b8d61f2d09c3f0adeec4db0ab540619b8.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into openchange
Conflicts: source/headermap.txt (This used to be commit 1b084e85c1f5963d924f7764ae751f8cd8e57364)
Diffstat (limited to 'source4/lib/util/util.c')
-rw-r--r--source4/lib/util/util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/lib/util/util.c b/source4/lib/util/util.c
index 7b6bfeeb7b..b5bb75358e 100644
--- a/source4/lib/util/util.c
+++ b/source4/lib/util/util.c
@@ -582,3 +582,18 @@ _PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count)
return realloc(ptr, el_size * count);
}
+_PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name)
+{
+ void *result;
+
+ result = talloc_check_name(ptr, name);
+ if (result != NULL)
+ return result;
+
+ DEBUG(0, ("Talloc type mismatch, expected %s, got %s\n",
+ name, talloc_get_name(ptr)));
+ smb_panic("talloc type mismatch");
+ /* Keep the compiler happy */
+ return NULL;
+}
+