From: Roy Marples Date: Wed, 9 Jan 2008 10:17:10 +0000 (+0000) Subject: Use correct castings for UINT16_MAX. X-Git-Tag: v3.2.3~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77ea0429122c831a5330472d206a651374e32763;p=thirdparty%2Fdhcpcd.git Use correct castings for UINT16_MAX. --- diff --git a/dhcp.c b/dhcp.c index 847a0691..22cdd5b8 100644 --- 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;