bridge: Minor style fix.
[sliver-openvswitch.git] / vswitchd / bridge.c
index 311753d..fed22d3 100644 (file)
@@ -1721,8 +1721,7 @@ iface_refresh_status(struct iface *iface)
                                     netdev_features_is_full_duplex(current)
                                     ? "full" : "half");
         ovsrec_interface_set_link_speed(iface->cfg, &bps, 1);
-    }
-    else {
+    } else {
         ovsrec_interface_set_duplex(iface->cfg, NULL);
         ovsrec_interface_set_link_speed(iface->cfg, NULL, 0);
     }
@@ -1731,8 +1730,7 @@ iface_refresh_status(struct iface *iface)
     if (!error) {
         mtu_64 = mtu;
         ovsrec_interface_set_mtu(iface->cfg, &mtu_64, 1);
-    }
-    else {
+    } else {
         ovsrec_interface_set_mtu(iface->cfg, NULL, 0);
     }
 }
@@ -1779,7 +1777,11 @@ iface_refresh_cfm_stats(struct iface *iface)
         ovsrec_interface_set_cfm_remote_mpids(cfg,
                                               (const int64_t *)status.rmps,
                                               status.n_rmps);
-        ovsrec_interface_set_cfm_health(cfg, &cfm_health, 1);
+        if (cfm_health >= 0) {
+            ovsrec_interface_set_cfm_health(cfg, &cfm_health, 1);
+        } else {
+            ovsrec_interface_set_cfm_health(cfg, NULL, 0);
+        }
     }
 }