]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
change hash_remove_link() to return void and fatal() upon error.
authorwessels <>
Thu, 14 May 1998 03:24:46 +0000 (03:24 +0000)
committerwessels <>
Thu, 14 May 1998 03:24:46 +0000 (03:24 +0000)
src/fqdncache.cc
src/ipcache.cc
src/protos.h

index b2fcb29c80bab1c9879e9cf86afcb33ca44a45f6..c861ba9dfde310db5b2dab76afe558de3790097d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fqdncache.cc,v 1.99 1998/04/22 01:40:16 wessels Exp $
+ * $Id: fqdncache.cc,v 1.100 1998/05/13 21:24:46 wessels Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -199,11 +199,7 @@ fqdncache_release(fqdncache_entry * f)
     assert(f->status != FQDN_PENDING);
     assert(f->status != FQDN_DISPATCHED);
     assert(f->pending_head == NULL);
-    if (hash_remove_link(fqdn_table, (hash_link *) f)) {
-       debug(35, 0) ("fqdncache_release: hash_remove_link() failed for '%s'\n",
-           f->name);
-       return;
-    }
+    hash_remove_link(fqdn_table, (hash_link *) f);
     if (f->status == FQDN_CACHED) {
        for (k = 0; k < (int) f->name_count; k++)
            safe_free(f->names[k]);
@@ -819,10 +815,7 @@ fqdncacheChangeKey(fqdncache_entry * f)
        debug_trap("fqdncacheChangeKey: f != table_entry!");
        return;
     }
-    if (hash_remove_link(fqdn_table, table_entry)) {
-       debug_trap("fqdncacheChangeKey: hash_remove_link() failed\n");
-       return;
-    }
+    hash_remove_link(fqdn_table, table_entry);
     snprintf(new_key, 256, "%d/", ++index);
     strncat(new_key, f->name, 128);
     debug(14, 1) ("fqdncacheChangeKey: from '%s' to '%s'\n", f->name, new_key);
index ea46ae8e2090559ea0438c1e80df93e57bd21e9f..7490c3157dea5686d187f19fd25006da6a7749c5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.cc,v 1.183 1998/05/08 23:29:27 wessels Exp $
+ * $Id: ipcache.cc,v 1.184 1998/05/13 21:24:47 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -240,11 +240,7 @@ ipcache_release(ipcache_entry * i)
        IpcacheStats.release_locked++;
        return;
     }
-    if (hash_remove_link(ip_table, table_entry)) {
-       debug(14, 0) ("ipcache_release: hash_remove_link() failed for '%s'\n",
-           i->name);
-       return;
-    }
+    hash_remove_link(ip_table, table_entry);
     dlinkDelete(&i->lru, &lru_list);
     if (i->status == IP_CACHED) {
        safe_free(i->addrs.in_addrs);
@@ -990,10 +986,7 @@ ipcacheChangeKey(ipcache_entry * i)
        return;
     }
     assert(i == (ipcache_entry *) table_entry);
-    if (hash_remove_link(ip_table, table_entry)) {
-       debug_trap("ipcacheChangeKey: hash_remove_link() failed\n");
-       return;
-    }
+    hash_remove_link(ip_table, table_entry);
     snprintf(new_key, 256, "%d/", ++index);
     strncat(new_key, i->name, 128);
     debug(14, 1) ("ipcacheChangeKey: from '%s' to '%s'\n", i->name, new_key);
index 980fe1143886a91691607b3af7a6a7304da5bcac..e6f810d5b3a0d80705d38d5da3dcfe6843ea34ba 100644 (file)
@@ -213,7 +213,7 @@ extern void whoisStart(request_t * req, StoreEntry *);
 
 extern hash_table *hash_create(HASHCMP *, int, HASHHASH *);
 extern void hash_join(hash_table *, hash_link *);
-extern int hash_remove_link(hash_table *, hash_link *);
+extern void hash_remove_link(hash_table *, hash_link *);
 extern int hashPrime(int n);
 extern void *hash_lookup(hash_table *, const void *);
 extern void *hash_first(hash_table *);