Minor fix (add some parenthesis where macro expansion could cause problems)

This commit is contained in:
fbernon 2007-09-05 10:18:39 +00:00
parent d4616a7fc6
commit 5865a78c1e
3 changed files with 5 additions and 5 deletions

View File

@ -35,8 +35,8 @@
/* this might define NULL already */ /* this might define NULL already */
#include "arch/cc.h" #include "arch/cc.h"
#define LWIP_MAX(x , y) (x) > (y) ? (x) : (y) #define LWIP_MAX(x , y) (((x) > (y)) ? (x) : (y))
#define LWIP_MIN(x , y) (x) < (y) ? (x) : (y) #define LWIP_MIN(x , y) (((x) < (y)) ? (x) : (y))
#ifndef NULL #ifndef NULL
#define NULL ((void *)0) #define NULL ((void *)0)

View File

@ -610,7 +610,7 @@
* as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
*/ */
#ifndef TCP_SND_QUEUELEN #ifndef TCP_SND_QUEUELEN
#define TCP_SND_QUEUELEN 4 * TCP_SND_BUF/TCP_MSS #define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF/TCP_MSS))
#endif #endif
/** /**
@ -619,7 +619,7 @@
* TCP snd_buf for select to return writable. * TCP snd_buf for select to return writable.
*/ */
#ifndef TCP_SNDLOWAT #ifndef TCP_SNDLOWAT
#define TCP_SNDLOWAT TCP_SND_BUF/2 #define TCP_SNDLOWAT (TCP_SND_BUF/2)
#endif #endif
/** /**

View File

@ -80,7 +80,7 @@ struct sockaddr {
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ #define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ #define SO_REUSEPORT 0x0200 /* allow local address & port reuse */
#define SO_DONTLINGER (int)(~SO_LINGER) #define SO_DONTLINGER ((int)(~SO_LINGER))
/* /*
* Additional options, not kept in so_options. * Additional options, not kept in so_options.