Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Set value to false first in pkg_config_bool().
jlaffaye committed 14 years ago
commit bc284da3b6593872e054a4895e78e54c9fc87e90
parent 3871973
1 file changed +2 -2
modified libpkg/pkg_config.c
@@ -152,6 +152,8 @@ pkg_config_bool(pkg_config_key key, bool *val)
{
	const char *str;

+
	*val = false;
+

	if (parsed != true) {
		pkg_emit_error("pkg_init() must be called before pkg_config_bool()");
		return (EPKG_FATAL);
@@ -165,8 +167,6 @@ pkg_config_bool(pkg_config_key key, bool *val)
	str = c[key].val;
	if (str != NULL && strcasecmp(str, "yes"))
		*val = true;
-
	else
-
		*val = false;

	return (EPKG_OK);
}