Make LWIP_RAND optional (useful for small targets)

This commit is contained in:
Simon Goldschmidt
2011-09-03 22:27:30 +02:00
parent e27d34d118
commit 5e8ee7e006
2 changed files with 5 additions and 1 deletions

View File

@@ -699,8 +699,10 @@ igmp_start_timer(struct igmp_group *group, u8_t max_time)
if (max_time == 0) {
max_time = 1;
}
#ifdef LWIP_RAND
/* ensure the random value is > 0 */
group->timer = (LWIP_RAND() % (max_time - 1)) + 1;
#endif /* LWIP_RAND */
}
/**