lib/util: remove samba specific talloc_get_type_abort()
authorStefan Metzmacher <metze@samba.org>
Tue, 3 Mar 2009 17:03:57 +0000 (18:03 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 3 Mar 2009 17:07:33 +0000 (18:07 +0100)
metze

lib/util/util.c
lib/util/util.h
source3/include/includes.h
source3/include/proto.h

index 1f31f55e8b2fd1a39e3c545fe733cf4370682d04..0148bdb00d4d43a4246130b9e5993c6f67253d48 100644 (file)
@@ -541,21 +541,6 @@ void *malloc_array(size_t el_size, unsigned int count)
        return realloc_array(NULL, el_size, count, false);
 }
 
-_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;
-}
-
 /**
  Trim the specified elements off the front and back of a string.
 **/
index 1f6e3b193b3d0a9f9970428e19c45611e7401fca..defef127d93e4f162a8d2186a5a4ca6f40cf939b 100644 (file)
@@ -767,13 +767,6 @@ bool pm_process( const char *fileName,
                  bool (*pfunc)(const char *, const char *, void *),
                                 void *userdata);
 
-/**
- * Add-on to talloc_get_type
- */
-_PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name);
-#define talloc_get_type_abort(ptr, type) \
-       (type *)talloc_check_name_abort(ptr, #type)
-
 bool unmap_file(void *start, size_t size);
 
 void print_asc(int level, const uint8_t *buf,int len);
index ca918b37df78e6b0221f8efc0afbb7c6923e3ca5..b48a75526a6e2a0ae271522367c1feaa8e0d4934 100644 (file)
@@ -584,10 +584,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "../lib/util/time.h"
 #include "../lib/util/asn1.h"
 
-/* And a little extension. Abort on type mismatch */
-#define talloc_get_type_abort(ptr, type) \
-       (type *)talloc_check_name_abort(ptr, #type)
-
 #include "ads.h"
 #include "ads_dns.h"
 #include "interfaces.h"
index e1eab8dc162ac8ba12b614ea1a093e1619b852b2..78110161c5a294667b919f747d65ebec53a61e73 100644 (file)
@@ -1173,7 +1173,6 @@ bool mask_match_search(const char *string, const char *pattern, bool is_case_sen
 bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive);
 bool unix_wild_match(const char *pattern, const char *string);
 bool name_to_fqdn(fstring fqdn, const char *name);
-void *talloc_check_name_abort(const void *ptr, const char *name);
 void *talloc_append_blob(TALLOC_CTX *mem_ctx, void *buf, DATA_BLOB blob);
 uint32 map_share_mode_to_deny_mode(uint32 share_access, uint32 private_options);
 pid_t procid_to_pid(const struct server_id *proc);