lkml.org 
[lkml]   [2008]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: A style question: repeated return value check
2008/9/30 Ingo Molnar <mingo@elte.hu>:
> in this particular case it's marginally worse style i think, even
> considering that it makes the code more compact. The reason is that it
> makes the code a tiny bit less obvious: the flow looks a bit unusual and
> when skimming it i'd have to look once more to understand its purpose.
> With the returns its more verbose but also plain obvious. YMMV.

I think the same. The code flow seems to me more natural as is even if
it looks more
noisy.
IMHO, when one is reading the code, such a compact path forces a break
to figure out
what is going on in these tests.

But I agree with Pekka for the fact that it could be unified in a
single call to trace_seq_printf.
That will produce a small "3 format" easy to understand. Seems good.


\
 
 \ /
  Last update: 2008-09-30 10:51    [W:0.075 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site