[ovs-dev] [PATCH 11/15] ovs-brcompatd: Use error instead of pointer in handle_fdb_query_cmd().
Ben Pfaff
blp at nicira.com
Wed Feb 10 19:43:39 UTC 2010
It is safe to use either value here but as long as we are saving the
error value we might as well use it.
Found by Clang (http://clang-analyzer.llvm.org/).
---
vswitchd/ovs-brcompatd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
index beaefb2..faf1bee 100644
--- a/vswitchd/ovs-brcompatd.c
+++ b/vswitchd/ovs-brcompatd.c
@@ -756,7 +756,7 @@ handle_fdb_query_cmd(const struct ovsrec_open_vswitch *ovs,
struct netdev *netdev;
error = netdev_open_default(iface_name, &netdev);
- if (netdev) {
+ if (!error) {
if (!netdev_get_etheraddr(netdev, mac->addr)) {
n_local_macs++;
}
--
1.6.6.1
More information about the dev
mailing list