CLEANUP: pattern: Ignore unknown samples in pat_match_ip().

Ignore samples that are neither SMP_T_IPV4 nor SMP_T_IPV6 instead of
matching with an uninitialized value in this case.

This situation should not occur in the current codebase but triggers
warnings in static code analysis tools.

Found in haproxy 1.5.
This commit is contained in:
Andreas Seltenreich 2016-03-03 20:08:35 +01:00 committed by Willy Tarreau
parent 9727cf482c
commit f0653192e3
1 changed files with 3 additions and 0 deletions

View File

@ -1021,6 +1021,9 @@ struct pattern *pat_match_ip(struct sample *smp, struct pattern_expr *expr, int
}
else
continue;
} else {
/* impossible */
continue;
}
/* Check if the input sample match the current pattern. */