diff options
author | Joe Stringer <joestringer@nicira.com> | 2015-08-05 13:31:25 -0700 |
---|---|---|
committer | Joe Stringer <joestringer@nicira.com> | 2015-08-24 17:34:28 -0700 |
commit | 6c52e6d8c0e54f1876502bda9aeffd20b85f5cde (patch) | |
tree | b64777df5d4192b4ef0f91c70974d028d6d8efb4 | |
parent | 2fac5fedc7e871e8c7abb36f514bbd11de48b3ed (diff) | |
download | openvswitch-6c52e6d8c0e54f1876502bda9aeffd20b85f5cde.tar.gz |
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 <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
-rw-r--r-- | lib/ofp-print.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |