On 1/21/09, debian developer <[email protected]> wrote:
>
>
> On Wed, Jan 21, 2009 at 1:13 PM, Fernando Apesteguía
> <[email protected]> wrote:
> >
> > On 1/21/09, debian developer <[email protected]> wrote:
> > > I don't seem to understand this patch. What is swap(a, b) returning
> here?
> > > and where is it returning from?
> >
> > It is not "returning" but substituting, cause it's a macro, not a
> > function. It swaps the values of "a" and "b".
> >
> >
> >
> >
> >
> > > > > > The reason I ask it that I wonder why swap() has a return value?
> >
>
> ^^^^^^^^^^^^^^^^ that was the reason I asked where it is returning :)
>
> With a macro without do-while:
>
> if(condition)
>   swap(a, b)
>
> will be
>
> if(condition)
> ({
> ...;
> ...;
> }
> )
>
> I still see all the lines being executed in case the condition is true.

Yep, absolutely right (I missed the parenthesis). Coding style? I've
seen this macros protected by do-while structures but not usually with
"({ ... })".

About the other thing, I don't see the "accident" they mention
above... anybody sees it?

>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to