From 0113b735adba5f1e4bc391a154ec8c379bcfdaca Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 2 Jul 2007 20:07:19 +0000 Subject: [PATCH] Fixed a little cast-warning from u32_t to u16_t --- src/core/ipv4/autoip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ipv4/autoip.c b/src/core/ipv4/autoip.c index 6aecc6ff..eeaf1267 100644 --- a/src/core/ipv4/autoip.c +++ b/src/core/ipv4/autoip.c @@ -262,7 +262,7 @@ autoip_start(struct netif *netif) * choosen out of 0 to PROBE_WAIT seconds. * compliant to RFC 3927 Section 2.2.1 */ - autoip->ttw = (LWIP_AUTOIP_RAND(netif) % (PROBE_WAIT * AUTOIP_TICKS_PER_SECOND)); + autoip->ttw = (u16_t)(LWIP_AUTOIP_RAND(netif) % (PROBE_WAIT * AUTOIP_TICKS_PER_SECOND)); /* * if we tried more then MAX_CONFLICTS we must limit our rate for @@ -321,7 +321,7 @@ autoip_tmr() LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | 3, ("autoip_tmr() PROBING Sent Probe\n")); netif->autoip->sent_num++; /* calculate time to wait to next probe */ - netif->autoip->ttw = (LWIP_AUTOIP_RAND(netif) % ((PROBE_MAX - PROBE_MIN) * AUTOIP_TICKS_PER_SECOND) ) + PROBE_MIN * AUTOIP_TICKS_PER_SECOND; + netif->autoip->ttw = (u16_t)((LWIP_AUTOIP_RAND(netif) % ((PROBE_MAX - PROBE_MIN) * AUTOIP_TICKS_PER_SECOND) ) + PROBE_MIN * AUTOIP_TICKS_PER_SECOND); } } break;