Commit: 212de293f2481e07780dc3730abc6ebb442d2ecf
Parent: 7827d0028195a245de1888bb3da938bba45e0c4f
Author: opask
Date: Mon, 23 Jul 2018 21:30:52 -0600
remove if !GLIBC you are broken, the opposite is typically true
Diffstat:
1 file changed, 0 insertions(+), 20 deletions(-)
diff --git a/cache.c b/cache.c
@@ -28,26 +28,6 @@ static void cache_add_to_tree(struct cache_entry *e)
if (!e->url[0]) return;
-#if !defined(__GLIBC__)
- if (!cache_root) {
- /*
- * Some implementations misbehave when deleting the last
- * element. They leak memory or return NULL from tdelete.
- * To guard against misbehavior, we insert one static element
- * and never delete it.
- * Glibc doesn't have this bug.
- */
- static unsigned char empty = 0;
-retry_static:
- p = tsearch(&empty, &cache_root, ce_compare);
- if (!p) {
- out_of_memory(0, cast_uchar "tsearch static", 0);
- goto retry_static;
- }
- if ((unsigned char *)*p != &empty) internal("cache_add_to_tree: static entry not added: %p, %p", *p, &empty);
- }
-#endif
-
retry:
p = tsearch(e->url, &cache_root, ce_compare);
if (!p) {