[PATCH 5/7] fetch: use free_refs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's no need for us to write this loop manually when a helper
function can already do it.

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 fetch-pack.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index e69993b2eb..a181d3401d 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -630,10 +630,7 @@ static void filter_refs(struct fetch_pack_args *args,
 	}
 
 	oidset_clear(&tip_oids);
-	for (ref = unmatched; ref; ref = next) {
-		next = ref->next;
-		free(ref);
-	}
+	free_refs(unmatched);
 
 	*refs = newlist;
 }
-- 
2.21.0.931.gd0bc72a411




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux