]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Use correct castings for UINT16_MAX.
authorRoy Marples <roy@marples.name>
Wed, 9 Jan 2008 10:17:10 +0000 (10:17 +0000)
committerRoy Marples <roy@marples.name>
Wed, 9 Jan 2008 10:17:10 +0000 (10:17 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 847a069116902bd89b34dd719e6f0eb36ea30014..22cdd5b8384ddc5c695a7cecd8e16ed3f5451122 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -131,8 +131,8 @@ size_t send_message (const interface_t *iface, const dhcp_t *dhcp,
                        logger (LOG_ERR, "dhcp: unknown hardware type %d", iface->family);
        }
 
-       if (up < 0 || up > UINT16_MAX)
-               message->secs = htons ((short) UINT16_MAX);
+       if (up < 0 || up > (time_t) UINT16_MAX)
+               message->secs = htons ((uint16_t) UINT16_MAX);
        else
                message->secs = htons (up);
        message->xid = xid;