From: Joe Stringer Date: Wed, 5 Aug 2015 20:31:25 +0000 (-0700) Subject: ofp-print: Fix redundant expression. X-Git-Tag: v2.5.0~701 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;ds=sidebyside;h=6c52e6d8c0e54f1876502bda9aeffd20b85f5cde;p=cascardo%2Fovs.git ofp-print: Fix redundant expression. '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 Acked-by: Ben Pfaff --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index b8088f362..6e32d4d3a 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; }