Commit 0d516178 authored by Mark Andrews's avatar Mark Andrews
Browse files

silence compiler

parent a449ffac
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: context.c,v 1.45 2004/03/05 05:12:45 marka Exp $ */ /* $Id: context.c,v 1.46 2004/09/17 05:59:28 marka Exp $ */
#include <config.h> #include <config.h>
...@@ -346,13 +346,12 @@ lwres_context_sendrecv(lwres_context_t *ctx, ...@@ -346,13 +346,12 @@ lwres_context_sendrecv(lwres_context_t *ctx,
struct timeval timeout; struct timeval timeout;
/* /*
* Type of tv_sec is long, so make sure the unsigned long timeout * Type of tv_sec is 32 bits long.
* does not overflow it.
*/ */
if (ctx->timeout <= (unsigned int)LONG_MAX) if (ctx->timeout <= 0x7FFFFFFFU)
timeout.tv_sec = (long)ctx->timeout; timeout.tv_sec = (int)ctx->timeout;
else else
timeout.tv_sec = LONG_MAX; timeout.tv_sec = 0x7FFFFFFF;
timeout.tv_usec = 0; timeout.tv_usec = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment