Thread (14 messages) 14 messages, 7 authors, 2007-10-04

Re: [PATCH] mac80211: Fix TX after monitor interface is converted to managed

flat view

From: Michael Wu <hidden>
Date: 2007-10-04 21:18:27
Also in: linux-wireless

On Thursday 04 October 2007 14:15, John W. Linville wrote:
Falling back on bloat as an argument against a BUG_ON in a
configuration path seems a bit weak. :-)
Seems strong to me. Bloat slows me down and distracts me from what code really 
needs to do. Bloat is an indication that one does not understand what the 
code really needs to do.
Programming with assertions (and BUG_ON is a form of that) is
generally a good practice.  Almost any book or other source on
good programming practices will agree.  Yes, it can be overdone.
But I don't really think that is the case here, since the check is
relatively inexpensive and the consequence should it ever *somehow*
happen could be a something wierd (crash, corruption, etc) w/o any
other indication of what occured.
A line has to be drawn somewhere. There's about a billion places where we can 
add checks like this because if an assumption should ever break, the code 
will break into pieces. However, we don't, and there's no reason to do so 
here other than to needlessly add code just because it makes you feel safer.

-Michael Wu

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help