Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
config: Drop conversion from int to bool
Dag-Erling Smørgrav committed 9 days ago
commit 6ff444f986f66cbbb3629a790cfc784e2c7a1f28
parent 1f4953e
1 file changed +1 -6
modified libpkg/pkg_config.c
@@ -1455,12 +1455,7 @@ pkg_ini(const char *path, const char *reposdir, pkg_init_flags flags)
			break;
		case UCL_BOOLEAN:
			o = ucl_object_fromstring_common(val, 0,
-
			    UCL_STRING_PARSE_BOOLEAN|UCL_STRING_PARSE_INT);
-
			if (o->type == UCL_INT) {
-
				bool bval = ucl_object_toint(o) != 0;
-
				ucl_object_unref(o);
-
				o = ucl_object_frombool(bval);
-
			}
+
			    UCL_STRING_PARSE_BOOLEAN);
			if (o->type != UCL_BOOLEAN) {
				pkg_emit_error("Invalid type for environment "
				    "variable %s, got %s, while expecting a boolean",