[libxml2.9.9][xpath] Redundant code present in xpath.c
libxml2 version: 2.9.9 The third and fourth comparison operations of the 'while' loop condition in function xmlXPathCompRelationalExpr is redundant. If both first and second comparison fails, evaluation is sure to fail for the rest too.
static void
xmlXPathCompRelationalExpr(xmlXPathParserContextPtr ctxt) {
xmlXPathCompAdditiveExpr(ctxt);
CHECK_ERROR;
SKIP_BLANKS;
while ((CUR == '<') ||
(CUR == '>') ||
((CUR == '<') && (NXT(1) == '=')) ||
((CUR == '>') && (NXT(1) == '='))) {
Edited by Ghost User