summaryrefslogtreecommitdiff
path: root/lib/bundle.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-12-27 15:44:41 -0800
committerBen Pfaff <blp@nicira.com>2011-12-27 17:01:23 -0800
commit408869427edc59058b6e7680e612b3a6cd46edc1 (patch)
tree4eaf35d9bdaa26ebcaa43f8fc59a8da07e061277 /lib/bundle.c
parente2a6ca36ca0ebd859f87bf135b90395c53214f28 (diff)
downloadopenvswitch-408869427edc59058b6e7680e612b3a6cd46edc1.tar.gz
bundle: Fix returned error code in one bundle_check() corner case.
In C, the || operator yields 0 or 1, not (as in some other languages) the value of its first nonzero operand. Found by inspection. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/bundle.c')
-rw-r--r--lib/bundle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundle.c b/lib/bundle.c
index af1be6303..5db97d393 100644
--- a/lib/bundle.c
+++ b/lib/bundle.c
@@ -152,8 +152,8 @@ bundle_check(const struct nx_action_bundle *nab, int max_ports,
VLOG_WARN_RL(&rl, "bundle_load action requires at least 16 bit "
"destination.");
error = ofp_mkerr(OFPET_BAD_ACTION, OFPBAC_BAD_ARGUMENT);
- } else {
- error = nxm_dst_check(nab->dst, ofs, n_bits, flow) || error;
+ } else if (!error) {
+ error = nxm_dst_check(nab->dst, ofs, n_bits, flow);
}
}