On Sun, 2008-08-03 at 10:21 -0300, Henrique de Moraes Holschuh wrote: > On Sun, 03 Aug 2008, Johannes Berg wrote: > > if (WARN_ON(!nb)) > > return -EINVAL; > > I could use the notation above instead of: > if (foo) { > WARN_ON(1); > return -ERROR; > } > > Ivo, which one you prefer? The if() with the condition and WARN on the > branch, or the if(WARN_ON(condition)) ? You really should either just BUG() as you guys seem to have decided on, which is fine with me, or use if(WARN_ON()) because that'll also put in an unlikely() etc. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part