From b88bdedf9c20793ee553612c897156f2f9a31dc7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 12 Jun 2020 17:35:35 +0200 Subject: altsvc: remove the num field from the altsvc struct It was superfluous since we have the list.size alredy Reported-by: Jay Satiro Fixes #5553 Closes #5563 --- lib/altsvc.c | 3 --- lib/altsvc.h | 1 - 2 files changed, 4 deletions(-) (limited to 'lib') diff --git a/lib/altsvc.c b/lib/altsvc.c index c9566c216..58cc66745 100644 --- a/lib/altsvc.c +++ b/lib/altsvc.c @@ -169,7 +169,6 @@ static CURLcode altsvc_add(struct altsvcinfo *asi, char *line) as->prio = prio; as->persist = persist ? 1 : 0; Curl_llist_insert_next(&asi->list, asi->list.tail, as, &as->node); - asi->num++; /* one more entry */ } } @@ -410,7 +409,6 @@ static void altsvc_flush(struct altsvcinfo *asi, enum alpnid srcalpnid, strcasecompare(srchost, as->src.host)) { Curl_llist_remove(&asi->list, e, NULL); altsvc_free(as); - asi->num--; } } } @@ -577,7 +575,6 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data, as->expires = maxage + time(NULL); as->persist = persist; Curl_llist_insert_next(&asi->list, asi->list.tail, as, &as->node); - asi->num++; /* one more entry */ infof(data, "Added alt-svc: %s:%d over %s\n", dsthost, dstport, Curl_alpnid2str(dstalpnid)); } diff --git a/lib/altsvc.h b/lib/altsvc.h index 248e71eef..578a4fbfb 100644 --- a/lib/altsvc.h +++ b/lib/altsvc.h @@ -52,7 +52,6 @@ struct altsvc { struct altsvcinfo { char *filename; struct curl_llist list; /* list of entries */ - size_t num; /* number of alt-svc entries */ long flags; /* the publicly set bitmask */ }; -- cgit v1.2.3