]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hash: delete unused debug function
authorViktor Szakats <commit@vsz.me>
Tue, 21 May 2024 08:14:17 +0000 (10:14 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 21 May 2024 13:08:04 +0000 (15:08 +0200)
It had no use in the curl codebase and was also protected by the macro
`AGGRESSIVE_TEST` (renamed in 2020), also with no local reference.

Added in ca6e77083768858aa34207f8c5dce38b3c05336d (2002-11-11)

Closes #13729

lib/hash.c
lib/hash.h

index 83033fca1d8e27cc0b636ef657dee3f7fcd1191e..ddbae4d3e1675ea8249312e741eb6eeba1b21805 100644 (file)
@@ -192,25 +192,6 @@ Curl_hash_pick(struct Curl_hash *h, void *key, size_t key_len)
   return NULL;
 }
 
-#if defined(DEBUGBUILD) && defined(AGGRESSIVE_TEST)
-void
-Curl_hash_apply(Curl_hash *h, void *user,
-                void (*cb)(void *user, void *ptr))
-{
-  struct Curl_llist_element  *le;
-  size_t i;
-
-  for(i = 0; i < h->slots; ++i) {
-    for(le = (h->table[i])->head;
-        le;
-        le = le->next) {
-      Curl_hash_element *el = le->ptr;
-      cb(user, el->ptr);
-    }
-  }
-}
-#endif
-
 /* Destroys all the entries in the given hash and resets its attributes,
  * prepping the given hash for [static|dynamic] deallocation.
  *
index 30467e97cf1303b317b405901bb35a4ba0b8c1e6..2bdc2471726d48274bf1ce35754558cdd6b6ad17 100644 (file)
@@ -80,8 +80,6 @@ void Curl_hash_init(struct Curl_hash *h,
 void *Curl_hash_add(struct Curl_hash *h, void *key, size_t key_len, void *p);
 int Curl_hash_delete(struct Curl_hash *h, void *key, size_t key_len);
 void *Curl_hash_pick(struct Curl_hash *, void *key, size_t key_len);
-void Curl_hash_apply(struct Curl_hash *h, void *user,
-                     void (*cb)(void *user, void *ptr));
 #define Curl_hash_count(h) ((h)->size)
 void Curl_hash_destroy(struct Curl_hash *h);
 void Curl_hash_clean(struct Curl_hash *h);