diff options
Diffstat (limited to 'contrib/bind9/lib/lwres/context.c')
-rw-r--r-- | contrib/bind9/lib/lwres/context.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/bind9/lib/lwres/context.c b/contrib/bind9/lib/lwres/context.c index 42bb416..b606b9d 100644 --- a/contrib/bind9/lib/lwres/context.c +++ b/contrib/bind9/lib/lwres/context.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: context.c,v 1.41.2.1.2.3 2004/03/06 08:15:30 marka Exp $ */ +/* $Id: context.c,v 1.41.2.1.2.4 2004/09/17 05:50:31 marka Exp $ */ #include <config.h> @@ -346,13 +346,12 @@ lwres_context_sendrecv(lwres_context_t *ctx, struct timeval timeout; /* - * Type of tv_sec is long, so make sure the unsigned long timeout - * does not overflow it. + * Type of tv_sec is 32 bits long. */ - if (ctx->timeout <= (unsigned int)LONG_MAX) - timeout.tv_sec = (long)ctx->timeout; + if (ctx->timeout <= 0x7FFFFFFFU) + timeout.tv_sec = (int)ctx->timeout; else - timeout.tv_sec = LONG_MAX; + timeout.tv_sec = 0x7FFFFFFF; timeout.tv_usec = 0; |