From d63fbe6cd5e055b40ae8e4aa209b9aef07074f8b Mon Sep 17 00:00:00 2001 From: rodri Date: Wed, 2 Aug 2023 11:52:57 +0000 Subject: wrote a readme. removed unnecessary Hdr**. --- sip.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sip.c') diff --git a/sip.c b/sip.c index 2c25da8..d237dd8 100644 --- a/sip.c +++ b/sip.c @@ -318,19 +318,19 @@ getheader(Hdrtab *ht, char *name) void delheader(Hdrtab *ht, char *name) { - Hdr **h, *nh; + Hdr *h, *nh; uint key; key = hash(name); - h = &ht->headers[key]; - while(*h != nil){ - nh = (*h)->next; - if(cistrcmp((*h)->name, name) == 0){ - free((*h)->name); - free((*h)->value); - free(*h); + h = ht->headers[key]; + while(h != nil){ + nh = h->next; + if(cistrcmp(h->name, name) == 0){ + free(h->name); + free(h->value); + free(h); } - *h = nh; + h = nh; } } -- cgit v1.2.3