Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix initialization of length and checksum.
Bryan Drewery committed 11 years ago
commit 8fb732a69d17795217a63b5cd664d115c64578ff
parent 6f4ae5c
1 file changed +2 -5
modified libpkg/repo/binary/update.c
@@ -691,11 +691,8 @@ pkg_repo_binary_update_incremental(const char *name, struct pkg_repo *repo,
		offset = strsep(&p, ":");
		/* files offset */
		strsep(&p, ":");
-
		if (p)
-
			length = strsep(&p, ":\n");
-
		/* Checksum */
-
		if (p)
-
			checksum = strsep(&p, ":\n");
+
		length = p ? strsep(&p, ":\n") : NULL;
+
		checksum = p ? strsep(&p, ":\n") : NULL;

		if (origin == NULL || digest == NULL ||
				offset == NULL) {