lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] LWIP_DEBUGF


From: Lou Cypher
Subject: Re: [lwip-users] LWIP_DEBUGF
Date: Mon, 20 Jul 2009 09:52:27 +0200
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

> I just had a look at the define of LWIP_DEBUGF. I wonder whats the use
> of the do {} while(0) statement. Its contens is executed one time, so
> the loop can be omitted, isn't it?

As someone else already pointed out, there are good reasons to do so, when you
want to treat a macro, as more as possible, like a function.
Another general C-style guide, with examples about it, is the following:
  http://www.chris-lott.org/resources/cstyle/indhill-cstyle.html
unfortunately there are no links to paragraph, so you will have to look for the
title "Macros" (about in the middle of the document)

Lou

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium




reply via email to

[Prev in Thread] Current Thread [Next in Thread]