mbed OS5

Fork of UIPEthernet by Zoltan Hudak

Revision:
6:10e42359e217
Parent:
4:d774541a34da
Child:
7:1bc7e6120801
--- a/Dhcp.cpp	Fri Nov 27 20:34:03 2015 +0000
+++ b/Dhcp.cpp	Sun Nov 29 17:54:01 2015 +0000
@@ -48,7 +48,7 @@
 
     // Pick an initial transaction ID
 
-    _dhcpTransactionId = (rand() * 2000UL) / RAND_MAX + 1;
+    _dhcpTransactionId = (rand() % 2000UL) + 1;
     _dhcpInitialTransactionId = _dhcpTransactionId;
 
     _dhcpUdpSocket.stop();