* Eliminate generic_free_handler() since it is not needed
authorArt Cancro <ajc@citadel.org>
Mon, 3 May 2010 16:41:45 +0000 (16:41 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 3 May 2010 16:41:45 +0000 (16:41 +0000)
citadel/modules/calendar/serv_calendar.c
citadel/modules/expire/serv_expire.c
citadel/modules/openid/serv_openid_rp.c
citadel/modules/xmpp/xmpp_presence.c
libcitadel/lib/hash.c
libcitadel/lib/libcitadel.h

index 5cb20dbc9ac14e7c6b436cdb60c249e7cc9a96b7..2e69934478d5f0994b78592ecea2edf4d8784446 100644 (file)
@@ -1706,7 +1706,7 @@ void ical_putics_grabtzids(icalparameter *param, void *data)
        HashList *keys = (HashList *) data;
        
        if ( (keys) && (tzid) && (!IsEmptyStr(tzid)) ) {
-               Put(keys, tzid, strlen(tzid), strdup(tzid), generic_free_handler);
+               Put(keys, tzid, strlen(tzid), strdup(tzid), NULL);
        }
 }
 
index 6bdf67068894fb25c67efd1be0d0646081cc6a77..ac1a6f8aadf44af7bd38c17f4d34f252c51b2b10 100644 (file)
@@ -831,7 +831,7 @@ int PurgeStaleOpenIDassociations(void) {
                        memcpy(&usernum, cdboi->ptr, sizeof(long));
                        if (CtdlGetUserByNumber(&usbuf, usernum) != 0) {
                                deleteme = strdup(cdboi->ptr + sizeof(long)),
-                               Put(keys, deleteme, strlen(deleteme), deleteme, generic_free_handler);
+                               Put(keys, deleteme, strlen(deleteme), deleteme, NULL);
                        }
                }
                cdb_free(cdboi);
index 16f189e0d2f58e2f04591bd14a8b226db709d12d..79c10dd5d8987a8a35283525b71f88b9ed629974 100644 (file)
@@ -159,7 +159,7 @@ void openid_purge(struct ctdluser *usbuf) {
                        memcpy(&usernum, cdboi->ptr, sizeof(long));
                        if (usernum == usbuf->usernum) {
                                deleteme = strdup(cdboi->ptr + sizeof(long)),
-                               Put(keys, deleteme, strlen(deleteme), deleteme, generic_free_handler);
+                               Put(keys, deleteme, strlen(deleteme), deleteme, NULL);
                        }
                }
                cdb_free(cdboi);
@@ -734,7 +734,7 @@ void cmd_oidf(char *argbuf) {
                extract_token(thiskey, buf, 0, '|', sizeof thiskey);
                extract_token(thisdata, buf, 1, '|', sizeof thisdata);
                CtdlLogPrintf(CTDL_DEBUG, "%s: [%d] %s\n", thiskey, strlen(thisdata), thisdata);
-               Put(keys, thiskey, strlen(thiskey), strdup(thisdata), generic_free_handler);
+               Put(keys, thiskey, strlen(thiskey), strdup(thisdata), NULL);
        }
 
 
index c222b086c3ef09c34ce4259e44284124ea3d8029..ca33d1e57336aab409cb401ab7778b2cc74f4bdd 100644 (file)
@@ -317,8 +317,7 @@ void xmpp_massacre_roster(void)
                                        xmpp_destroy_buddy(cptr[i].cs_inet_email);
                                        if (mortuary) {
                                                char *buddy = strdup(cptr[i].cs_inet_email);
-                                               Put(mortuary, buddy, strlen(buddy),
-                                                       buddy, generic_free_handler);
+                                               Put(mortuary, buddy, strlen(buddy), buddy, NULL);
                                        }
                                }
                        }
index ac6a377ff16ff188a62d2bfc9bea993b8ac63042..684dc466de08889b505ed8b7fa7f0dce82d6e486 100644 (file)
@@ -955,15 +955,6 @@ void SortByPayload(HashList *Hash, CompareFunc SortBy)
  */
 
 
-/*
- * Generic function to free a pointer.  This can be used as a callback with the
- * hash table, even on systems where free() is defined as a macro or has had other
- * horrible things done to it.
- */
-void generic_free_handler(void *ptr) {
-       free(ptr);
-}
-
 /*
  * Generic function to free a reference.  
  * since a reference actualy isn't needed to be freed, do nothing.
index 70f14cc967cf37f8d35e7a91e20c1f8faef15e12..9cd807e9dd4aa43786c202da3485e2d5cee8a79a 100644 (file)
@@ -411,7 +411,6 @@ void SortByHashKeyStr(HashList *Hash);
 int GetCount(HashList *Hash);
 const void *GetSearchPayload(const void *HashVoid);
 void SortByPayload(HashList *Hash, CompareFunc SortBy);
-void generic_free_handler(void *ptr);
 void reference_free_handler(void *ptr);
 int HashLittle(const void *key, size_t length);