- **status**: review --> fixed
- **Comment**:

changeset:   6856:a6b9c9ab1013
tag:         tip
user:        Nagendra Kumar<[email protected]>
date:        Fri Sep 18 18:41:07 2015 +0530
summary:     amfd: correct logic in si dep flow [#276]


[staging:a6b9c9]




---

** [tickets:#276] amf: Suspicios comparisons in AMF.**

**Status:** fixed
**Milestone:** 4.7.FC
**Created:** Mon May 20, 2013 06:46 AM UTC by Praveen
**Last Updated:** Wed Aug 26, 2015 06:22 AM UTC
**Owner:** Nagendra Kumar


Migrated from http://devel.opensaf.org/ticket/2640.

There are a couple of boolean expressions in 
osaf/services/saf/avsv/avd/avd_siDep.c that are always true (i.e. tautologies). 
These have the form:
 
if (x != A || x != B) { ... }

 where x is a variable and A and B are two different constants.
 

On line 1745:
 
if((dep_si->si_dep_state != AVD_SI_TOL_TIMER_RUNNING) ||
                (dep_si->si_dep_state != AVD_SI_READY_TO_UNASSIGN)) {
        avd_sidep_start_tolerance_timer_for_dependant(dep_si, si);

}

 On line 2040:
 
if(((dep_si->si_dep_state != AVD_SI_TOL_TIMER_RUNNING) ||
        (dep_si->si_dep_state != AVD_SI_READY_TO_UNASSIGN) ||
        (dep_si->si_dep_state != AVD_SI_FAILOVER_UNDER_PROGRESS)) &&
        (all_sponsors_assigned_active(dep_si))) {

        si_dep_state_set(dep_si, AVD_SI_FAILOVER_UNDER_PROGRESS);
        if (dep_si->num_dependents > 0) {
                /* This SI also has dependents under it, update their state 
also */
                avd_update_depstate_si_failover(dep_si, su);
        }
}

 On line 2053:
 
if((dep_si->si_dep_state != AVD_SI_TOL_TIMER_RUNNING) ||
        (dep_si->si_dep_state != AVD_SI_READY_TO_UNASSIGN) ||
        (dep_si->si_dep_state != AVD_SI_FAILOVER_UNDER_PROGRESS)) {

        si_dep_state_set(dep_si, AVD_SI_FAILOVER_UNDER_PROGRESS);
        if (dep_si->num_dependents > 0) {
                /* This SI also has dependents under it, update their state 
also */
                avd_update_depstate_si_failover(dep_si, su);
        }
}

 On line 2097:
 
if((dep_si->si_dep_state != AVD_SI_TOL_TIMER_RUNNING) ||
   (dep_si->si_dep_state != AVD_SI_READY_TO_UNASSIGN) ||
   (dep_si->si_dep_state != AVD_SI_FAILOVER_UNDER_PROGRESS)) {

        si_dep_state_set(dep_si, AVD_SI_FAILOVER_UNDER_PROGRESS);
        if (dep_si->num_dependents > 0) {
                avd_update_depstate_si_failover(dep_si, su);
        }
}



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to