Messages in this thread | | | Date | Tue, 30 Sep 2008 10:48:04 +0200 | From | "Frédéric Weisbecker" <> | Subject | Re: 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.
| |