lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] LWIP_DEBUGF


From: Bernhard 'Gustl' Bauer
Subject: [lwip-users] LWIP_DEBUGF
Date: Mon, 20 Jul 2009 07:20:31 +0200
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

Hi,

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?

Gustl

#define LWIP_DEBUGF(debug,x) do { \
  if ( \
    ((debug) & LWIP_DBG_ON) && \
    ((debug) & LWIP_DBG_TYPES_ON) && \
    ((s16_t)((debug) & LWIP_DBG_MASK_LEVEL) >= LWIP_DBG_MIN_LEVEL)) { \
    LWIP_PLATFORM_DIAG(x); \
    if ((debug) & LWIP_DBG_HALT) { \
      while(1); \
    } \
  } \
} while(0)




reply via email to

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