From f7a5c55bc72ccd69e53c9f74f590b8d91dd4d9f1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 21 Jul 2012 21:49:37 +0200 Subject: [PATCH] libxbps: xbps_pkg_arch_match: fix conditional tests. --- lib/util.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/util.c b/lib/util.c index c19e5e2d..2ce1c7ba 100644 --- a/lib/util.c +++ b/lib/util.c @@ -282,13 +282,15 @@ xbps_pkg_arch_match(struct xbps_handle *xhp, const char *target) { if (target == NULL) { - if (strcmp(orig, "noarch") && strcmp(orig, xhp->un_machine)) - return false; + if ((strcmp(orig, "noarch") == 0) || + (strcmp(orig, xhp->un_machine) == 0)) + return true; } else { - if (strcmp(orig, "noarch") && strcmp(orig, target)) - return false; + if ((strcmp(orig, "noarch") == 0) || + (strcmp(orig, target) == 0)) + return true; } - return true; + return false; } char *