From: Ben Pfaff <blp@nicira.com>
Date: Thu, 30 Jul 2009 20:55:24 +0000 (-0700)
Subject: brcompatd: Fix handle_fdb_query_cmd() return value on error.
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=621fd03a0717358fb8600a8bacb99782ab181005;p=openvswitch

brcompatd: Fix handle_fdb_query_cmd() return value on error.

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.
---

diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
index e569c74d..7f050992 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;
         }
     }