Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix pkg_config_bool
Baptiste Daroussin committed 14 years ago
commit 1a2b32d8ff51f0372c8a7759887dcee7e1ad69da
parent dcd6d1f
2 files changed +2 -5
modified libpkg/pkg_config.c
@@ -176,8 +176,6 @@ pkg_config_string(pkg_config_key key, const char **val)
int
pkg_config_bool(pkg_config_key key, bool *val)
{
-
	const char *str;
-

	*val = false;

	if (parsed != true) {
@@ -190,8 +188,7 @@ pkg_config_bool(pkg_config_key key, bool *val)
		return (EPKG_FATAL);
	}

-
	str = c[key].val;
-
	if (str != NULL && strcasecmp(str, "yes"))
+
	if (c[key].val != NULL && strcasecmp(c[key].val, "yes") == 0)
		*val = true;

	return (EPKG_OK);
modified pkg/update.c
@@ -123,7 +123,7 @@ exec_update(int argc, char **argv)
	pkg_config_bool(PKG_CONFIG_MULTIREPOS, &multi_repos);

	/* single repository */
-
	if (multi_repos) {
+
	if (!multi_repos) {
		/*
		 * Single remote database
		 */