[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 3/4] util: Adjust the #ifdef logic in virNetDevBridgeCreate

Commit id 'adf846d3' added many ATTRIBUTE_FALLTHROUGH; statements;
however, this particular one caught the eye of the Coverity checker
which notes that the statement isn't reachable when the # if is true.

While it could be considered a false positive, just add an # else in
order to make it more obvious.

Signed-off-by: John Ferlan <jferlan redhat com>
 src/util/virnetdevbridge.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c
index 11b03b4..1361a51 100644
--- a/src/util/virnetdevbridge.c
+++ b/src/util/virnetdevbridge.c
@@ -478,11 +478,12 @@ virNetDevBridgeCreate(const char *brname)
             rc = virNetDevBridgeCreateWithIoctl(brname);
             goto cleanup;
-# endif
+# else
             /* intentionally fall through if virNetDevBridgeCreateWithIoctl()
              * isn't available.
+# endif
                                  _("error creating bridge interface %s"),

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]