replaced MIN to LWIP_MIN

This commit is contained in:
Sylvain Rochet 2012-05-17 23:41:39 +02:00
parent 1d7efce0dc
commit 6773326d96
5 changed files with 6 additions and 11 deletions

View File

@ -1163,7 +1163,7 @@ check_idle(arg)
if (idle_time_hook != 0) {
tlim = idle_time_hook(&idle);
} else {
itime = MIN(idle.xmit_idle, idle.recv_idle);
itime = LWIP_MIN(idle.xmit_idle, idle.recv_idle);
tlim = idle_time_limit - itime;
}
if (tlim <= 0) {

View File

@ -54,6 +54,7 @@
#endif
#include "pppd.h"
#include "pppmy.h"
#include "fsm.h"
#include "ipcp.h"
#include "lcp.h"
@ -100,7 +101,7 @@ demand_conf()
flush_flag = 0;
fcs = PPP_INITFCS;
netif_set_mtu(0, MIN(lcp_allowoptions[0].mru, PPP_MRU));
netif_set_mtu(0, LWIP_MIN(lcp_allowoptions[0].mru, PPP_MRU));
if (ppp_send_config(0, PPP_MRU, (u_int32_t) 0, 0, 0) < 0
|| ppp_recv_config(0, PPP_MRU, (u_int32_t) 0, 0, 0) < 0)
fatal("Couldn't set up demand-dialled PPP interface: %m");

View File

@ -53,6 +53,7 @@
#include <stdlib.h>
#include "pppd.h"
#include "pppmy.h"
#include "fsm.h"
#include "lcp.h"
#include "chap-new.h"
@ -1930,7 +1931,7 @@ lcp_up(f)
#ifdef HAVE_MULTILINK
if (!(multilink && go->neg_mrru && ho->neg_mrru))
#endif /* HAVE_MULTILINK */
netif_set_mtu(f->unit, MIN(MIN(mtu, mru), ao->mru));
netif_set_mtu(f->unit, LWIP_MIN(LWIP_MIN(mtu, mru), ao->mru));
ppp_send_config(f->unit, mtu,
(ho->neg_asyncmap? ho->asyncmap: 0xffffffff),
ho->neg_pcompression, ho->neg_accompression);

View File

@ -195,7 +195,7 @@ mp_join_bundle()
* For demand mode, we only need to configure the bundle
* and attach the link.
*/
mtu = MIN(ho->mrru, ao->mru);
mtu = LWIP_MIN(ho->mrru, ao->mru);
if (demand) {
cfg_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf);
netif_set_mtu(0, mtu);

View File

@ -896,13 +896,6 @@ extern void (*snoop_send_hook) __P((unsigned char *p, int len));
#endif /* defined(sun) || defined(SYSV) || defined(POSIX_SOURCE) */
#endif /* SIGTYPE */
#ifndef MIN
#define MIN(a, b) ((a) < (b)? (a): (b))
#endif
#ifndef MAX
#define MAX(a, b) ((a) > (b)? (a): (b))
#endif
#ifndef offsetof
#define offsetof(type, member) ((size_t) &((type *)0)->member)
#endif