[ovs-discuss] [NIC-19 05/10] brcompatd: Fix handle_fdb_query_cmd() return value on error.

Ben Pfaff blp at nicira.com
Fri Aug 7 17:40:22 UTC 2009


handle_fdb_query_cmd() should return an error when an error occurs, but
in this case it was always returning 0, because error is known to have
value 0 at this point.

Nothing really uses the return value here, and so eventually it would make
sense to just change the return type here and in the rest of the
handle_*() functions to void.
---
 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 e569c74..7f05099 100644
--- a/vswitchd/ovs-brcompatd.c
+++ b/vswitchd/ovs-brcompatd.c
@@ -631,7 +631,7 @@ handle_fdb_query_cmd(struct ofpbuf *buffer)
         if (!ovs_bridge || br_vlan < 0) {
             free(ovs_bridge);
             send_simple_reply(seq, ENODEV);
-            return error;
+            return ENODEV;
         }
     }
 
-- 
1.6.3.3





More information about the discuss mailing list