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 */
#include "arch/cc.h"
#define LWIP_MAX(x , y) (x) > (y) ? (x) : (y)
#define LWIP_MIN(x , y) (x) < (y) ? (x) : (y)
#define LWIP_MAX(x , y) (((x) > (y)) ? (x) : (y))
#define LWIP_MIN(x , y) (((x) < (y)) ? (x) : (y))
#ifndef NULL
#define NULL ((void *)0)

View File

@ -610,7 +610,7 @@
* as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
*/
#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
/**
@ -619,7 +619,7 @@
* TCP snd_buf for select to return writable.
*/
#ifndef TCP_SNDLOWAT
#define TCP_SNDLOWAT TCP_SND_BUF/2
#define TCP_SNDLOWAT (TCP_SND_BUF/2)
#endif
/**

View File

@ -80,7 +80,7 @@ struct sockaddr {
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
#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.