'features' is always a valid pointer to something on the stack, so checking (!features || ...) is the same as checking (false || ...). Simplify the expression.
Found by MIT STACK undefined behaviour checker. Signed-off-by: Joe Stringer <joestrin...@nicira.com> --- lib/ofp-print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index b8088f3..6e32d4d 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -2754,7 +2754,7 @@ ofp_print_table_features(struct ds *s, bool same_stats = prev_stats && table_stats_equal(stats, prev_stats); bool same_features = prev_features && table_features_equal(features, prev_features); - if ((!stats || same_stats) && (!features || same_features)) { + if ((!stats || same_stats) && same_features) { ds_put_cstr(s, " ditto"); return; } -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev