Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
clenaup: simplify pkg_checksum_free_entry
Baptiste Daroussin committed 4 years ago
commit 7af48336fc8aa2f0436c636c7ce9cc150391d31d
parent 7439bee
1 file changed +4 -6
modified libpkg/pkg_checksum.c
@@ -158,12 +158,10 @@ static const struct _pkg_cksum_type {
static void
pkg_checksum_free_entry(struct pkg_checksum_entry *e)
{
-
	if (e != NULL) {
-
		if (e->value) {
-
			free(e->value);
-
		}
-
		free(e);
-
	}
+
	if (e == NULL)
+
		return;
+
	free(e->value);
+
	free(e);
}

static void