[Pvfs2-developers] use of assert
Walter B. Ligon III
walt at clemson.edu
Fri Aug 4 14:38:15 EDT 2006
I'm wanting to check the group's collective wisdom on the use of assert
as opposed to a comparable check and error via gossip.
It seems to me it is desireable to use assert in any situation that is
considered so erroneous that the code cannot reasonably continue.
I'm running into a few situations where its not immediately clear
whether this is the case or not. For example, if someone calls a
function I've written to free a state machine data structure and the
pointer is NULL, things are very, very wrong. I *think* this warrants
an assert, but I just get concerned that with so many asserts in the
code we might be bailing more quicly than we should.
So, I'm just looking for a sanity check.
comments?
Walt
--
Dr. Walter B. Ligon III
Associate Professor
ECE Department
Clemson University
More information about the Pvfs2-developers
mailing list