Your first message said, "I see no reason for pure paranoia,
particularly if it's not commented as such." A BUG_ON() call makes it
clear that the condition should never happen. Dereferencing a NULL
leaves the question of whether NULL is an unhandled case or invalid
input. BUG_ON() is an explicit paranoia check, and with a bit of
preprocessing magic, you could compile out all of those checks.
So it documents invalid input conditions, allows you to eliminate the
checks in the name of speed or your personal preference, or use them to
help with debugging/testing.
Eli
--------------------. "If it ain't broke now,
Eli Carter \ it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/