Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
always initialize the `ret' variable in file() and meta_dirrm() in order to avoid returning undefined value.
Alexandre Perrin committed 13 years ago
commit 3af206d294157a37e0ace0d252f98a6a05d57fb6
parent 8fdc444
1 file changed +3 -3
modified libpkg/pkg_ports.c
@@ -214,7 +214,7 @@ meta_dirrm(struct plist *p, char *line, struct file_attr *a, bool try)
	char *testpath;
	struct stat st;
	bool developer;
-
	int ret;
+
	int ret = EPKG_OK;

	len = strlen(line);

@@ -283,7 +283,7 @@ file(struct plist *p, char *line, struct file_attr *a)
	bool regular = false;
	bool developer;
	char sha256[SHA256_DIGEST_LENGTH * 2 + 1];
-
	int ret;
+
	int ret = EPKG_OK;

	len = strlen(line);

@@ -341,7 +341,7 @@ file(struct plist *p, char *line, struct file_attr *a)
	}

	free_file_attr(a);
-
	return (EPKG_OK);
+
	return (ret);
}

static int