[ovs-dev] [PATCH 1/2] cfm: Define old_cfm_fault as 'enum cfm_fault_reason'.

Alex Wang alexw at nicira.com
Thu Mar 20 00:44:35 UTC 2014


CFM fault variable type has been changed to 'enum cfm_fault_reason' for
long time.  However, inside cfm_run(), the old_cfm_fault is still defined
as boolean.  This commit fixes the issue.

Found by inspection.

Signed-off-by: Alex Wang <alexw at nicira.com>
---
 lib/cfm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cfm.c b/lib/cfm.c
index 325931d..ff46019 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -393,11 +393,11 @@ cfm_run(struct cfm *cfm) OVS_EXCLUDED(mutex)
     if (timer_expired(&cfm->fault_timer)) {
         long long int interval = cfm_fault_interval(cfm);
         struct remote_mp *rmp, *rmp_next;
+        enum cfm_fault_reason old_cfm_fault = cfm->fault;
         uint64_t old_flap_count = cfm->flap_count;
         int old_health = cfm->health;
         size_t old_rmps_array_len = cfm->rmps_array_len;
         bool old_rmps_deleted = false;
-        bool old_cfm_fault = cfm->fault;
         bool old_rmp_opup = cfm->remote_opup;
         bool demand_override;
         bool rmp_set_opup = false;
@@ -498,7 +498,7 @@ cfm_run(struct cfm *cfm) OVS_EXCLUDED(mutex)
             }
 
             /* If there is a flap, increments the counter. */
-            if (old_cfm_fault == false || cfm->fault == false) {
+            if (old_cfm_fault == 0 || cfm->fault == 0) {
                 cfm->flap_count++;
             }
         }
-- 
1.7.9.5




More information about the dev mailing list