> If the assert is incorrect, then the print following it is also incorrect.
> I would rather see the assertion extended to cover the other valid states -
> assertions are a very useful way to document the code so that people can
> understand the assumptions made in functions regarding the state.  It also
> will fire if those assumptions are wrong and the code needs to be revised.

The assertion can't be correct, since the state was changed immediately before 
the assert.  Assertions can be nice if used judiciously, otherwise, it's just 
more noise added to already convoluted code.

>                                                 p_adapter->ipoib_state |=
> IPOIB_RESET_OR_DOWN;
> 
> -                                                              ASSERT(
> p_adapter->ipoib_state == IPOIB_RUNNING );
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to