rpmRangesOverlap: when both EVRs are non-existent or empty, overlap; otherwise use normal rpmEVRcmp algorithm

This commit is contained in:
Дмитрий Левин 2004-01-21 15:11:03 +00:00
parent 67149f7995
commit 4b6e05af60

View File

@ -503,8 +503,11 @@ int rpmRangesOverlap(const char * AName, const char * AEVR, int AFlags,
goto exit;
}
/* If either EVR is non-existent or empty, always overlap. */
if (!(AEVR && *AEVR && BEVR && *BEVR)) {
if (!AEVR) AEVR = "";
if (!BEVR) BEVR = "";
/* Optimize: when both EVRs are non-existent or empty, always overlap. */
if (!(*AEVR || *BEVR)) {
result = 1;
goto exit;
}