libxbps: xbps_pkg_arch_match: fix conditional tests.
This commit is contained in:
parent
a756060d38
commit
f7a5c55bc7
14
lib/util.c
14
lib/util.c
@ -282,13 +282,15 @@ xbps_pkg_arch_match(struct xbps_handle *xhp,
|
|||||||
const char *target)
|
const char *target)
|
||||||
{
|
{
|
||||||
if (target == NULL) {
|
if (target == NULL) {
|
||||||
if (strcmp(orig, "noarch") && strcmp(orig, xhp->un_machine))
|
if ((strcmp(orig, "noarch") == 0) ||
|
||||||
return false;
|
(strcmp(orig, xhp->un_machine) == 0))
|
||||||
} else {
|
|
||||||
if (strcmp(orig, "noarch") && strcmp(orig, target))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
if ((strcmp(orig, "noarch") == 0) ||
|
||||||
|
(strcmp(orig, target) == 0))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
Loading…
Reference in New Issue
Block a user