Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix condition for passing of SQL query parameter
Stefan Eßer committed 4 years ago
commit acc061fe55f3e0889a18903f3d7129967f74f5b1
parent f68b17f
2 files changed +2 -2
modified libpkg/pkgdb_query.c
@@ -166,7 +166,7 @@ pkgdb_query_cond(struct pkgdb *db, const char *cond, const char *pattern, match_
		return (NULL);
	}

-
	if (match != MATCH_ALL || cond != NULL)
+
	if (match != MATCH_ALL)
		sqlite3_bind_text(stmt, 1, pattern, -1, SQLITE_TRANSIENT);

	return (pkgdb_it_new_sqlite(db, stmt, PKG_INSTALLED, PKGDB_IT_FLAG_ONCE));
modified libpkg/repo/binary/query.c
@@ -130,7 +130,7 @@ pkg_repo_binary_query(struct pkg_repo *repo, const char *cond, const char *patte
	if (stmt == NULL)
		return (NULL);

-
	if (match != MATCH_ALL || cond != NULL)
+
	if (match != MATCH_ALL)
		sqlite3_bind_text(stmt, 1, pattern, -1, SQLITE_TRANSIENT);

	return (pkg_repo_binary_it_new(repo, stmt, PKGDB_IT_FLAG_ONCE));