Index: cache_cf.c =================================================================== RCS file: /cvsroot/squid/squid/src/cache_cf.c,v retrieving revision 1.38.6.11.2.2 diff -u -w -p -r1.38.6.11.2.2 cache_cf.c --- cache_cf.c 7 Apr 2003 13:28:50 -0000 1.38.6.11.2.2 +++ cache_cf.c 10 Jun 2003 12:41:25 -0000 @@ -2135,16 +2135,12 @@ dump_icap_service_type(StoreEntry *e, co static void free_icap_service_type(IcapConfig * cfg) { - icap_service *current_node = NULL; - icap_service *next_node = NULL; - if (cfg->service_head) { + while (cfg->service_head) { + icap_service *current_node = cfg->service_head; + cfg->service_head = current_node->next; current_node = cfg->service_head; - while (current_node) { - next_node = current_node->next; icap_service_destroy(current_node); cbdataFree(current_node); - current_node = next_node; - } } } @@ -2371,16 +2367,11 @@ dump_icap_class_type(StoreEntry *e, cons static void free_icap_class_type(IcapConfig *cfg) { - icap_class *current_node = NULL; - icap_class *next_node = NULL; - if (cfg->class_head) { - current_node = cfg->class_head; - while (current_node) { - next_node = current_node->next; + while (cfg->class_head) { + icap_class *current_node = cfg->class_head; + cfg->class_head = current_node->next; icap_class_destroy(current_node); memFree(current_node, MEM_ICAP_CLASS); - current_node = next_node; - } } } @@ -2543,16 +2534,11 @@ dump_icap_access_type(StoreEntry *e, con static void free_icap_access_type(IcapConfig * cfg) { - icap_access *current_node = NULL; - icap_access *next_node = NULL; - if (cfg->access_head) { - current_node = cfg->access_head; - while (current_node) { - next_node = current_node->next; + while (cfg->access_head) { + icap_access *current_node = cfg->access_head; + cfg->access_head = current_node->next; icap_access_destroy(current_node); memFree(current_node, MEM_ICAP_ACCESS); - current_node = next_node; - } } }