r17924: Get rid of warnings now that talloc is merged.
authorVolker Lendecke <vlendec@samba.org>
Tue, 29 Aug 2006 19:14:25 +0000 (19:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:59 +0000 (11:38 -0500)
Destructors now take a pointer to the "real" destroyed object as an argument.

Volker

source/auth/auth_util.c
source/lib/events.c
source/lib/smbldap.c
source/locking/brlock.c
source/locking/locking.c
source/passdb/passdb.c
source/utils/netlookup.c

index 26d1eb710f693c36a9465782a6faf396232f1215..c2f32f4f9553c9c87fb63b8dc3c254f4b8c0b45f 100644 (file)
@@ -513,11 +513,8 @@ NT_USER_TOKEN *get_root_nt_token( void )
        return token;
 }
 
-static int server_info_dtor(void *p)
+static int server_info_dtor(auth_serversupplied_info *server_info)
 {
-       auth_serversupplied_info *server_info =
-               talloc_get_type_abort(p, auth_serversupplied_info);
-
        if (server_info->sam_account != NULL) {
                TALLOC_FREE(server_info->sam_account);
        }
index 242c198511ec8c59a44272e84dd2f66c8d04a234..6db9930c300685e6b0be442c11a00f24b6f6877b 100644 (file)
@@ -23,9 +23,8 @@
 
 static struct timed_event *timed_events;
 
-static int timed_event_destructor(void *p)
+static int timed_event_destructor(struct timed_event *te)
 {
-       struct timed_event *te = talloc_get_type_abort(p, struct timed_event);
        DEBUG(10, ("Destroying timed event %lx \"%s\"\n", (unsigned long)te,
                te->event_name));
        DLIST_REMOVE(timed_events, te);
index a157ff132b7cb763d9c67adb21d4ab63abaac35d..b46ab4d750b48a870adb801e2bd9c4829d58661c 100644 (file)
@@ -340,8 +340,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
        return result;
 }
 
- static int ldapmsg_destructor(void *p) {
-       LDAPMessage **result = talloc_get_type_abort(p, LDAPMessage *);
+ static int ldapmsg_destructor(LDAPMessage **result) {
        ldap_msgfree(*result);
        return 0;
 }
@@ -361,9 +360,8 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
        talloc_set_destructor(handle, ldapmsg_destructor);
 }
 
- static int ldapmod_destructor(void *p) {
-       LDAPMod ***result = talloc_get_type_abort(p, LDAPMod **);
-       ldap_mods_free(*result, True);
+ static int ldapmod_destructor(LDAPMod ***mod) {
+       ldap_mods_free(*mod, True);
        return 0;
 }
 
index 9229d6e6e8a393f7efc3373e8025f2657dceb5b9..00cbed6b845f3635d7ab9c65f0de19263fe5b79d 100644 (file)
@@ -1492,10 +1492,8 @@ int brl_forall(BRLOCK_FN(fn))
  Unlock the record.
 ********************************************************************/
 
-static int byte_range_lock_destructor(void *p)
+static int byte_range_lock_destructor(struct byte_range_lock *br_lck)
 {
-       struct byte_range_lock *br_lck =
-               talloc_get_type_abort(p, struct byte_range_lock);
        TDB_DATA key;
 
        key.dptr = (char *)&br_lck->key;
index 8dd7fafd3b5d291e0f507c59cc30378ebe2ac1ed..371f1b474c0c73425c7fb40381ea0e78afdadd17 100644 (file)
@@ -672,10 +672,8 @@ static TDB_DATA unparse_share_modes(struct share_mode_lock *lck)
        return result;
 }
 
-static int share_mode_lock_destructor(void *p)
+static int share_mode_lock_destructor(struct share_mode_lock *lck)
 {
-       struct share_mode_lock *lck =
-               talloc_get_type_abort(p, struct share_mode_lock);
        TDB_DATA key = locking_key(lck->dev, lck->ino);
        TDB_DATA data;
 
index 55eb31ff84958ac122a56a74bd1973278edf16fe..8229fd68ab6516805e30da45dcf05a7614cd2fbd 100644 (file)
@@ -50,10 +50,8 @@ const char *my_sam_name(void)
 /**********************************************************************
 ***********************************************************************/
 
-static int samu_destroy(void *p
+static int samu_destroy(struct samu *user
 {
-       struct samu *user = (struct samu *)p;
-
        data_blob_clear_free( &user->lm_pw );
        data_blob_clear_free( &user->nt_pw );
 
index b9948485b94a97dbaa49ae790e4d4cacfd3bbc3b..d82630e5c8271669b83e2859d6ef3055efe21ff5 100644 (file)
@@ -41,7 +41,7 @@ static struct con_struct *cs;
  Close connection on context destruction.
 ********************************************************/
 
-static int cs_destructor(void *p)
+static int cs_destructor(struct con_struct *p)
 {
        if (cs->cli) {
                cli_shutdown(cs->cli);