From: Mark Andrews Date: Fri, 17 Sep 2004 05:59:28 +0000 (+0000) Subject: silence compiler X-Git-Tag: v9.2.5rc1~81^2~5 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=0d51617897658fcd9eed3a22f7ac8d77a7a260be;p=thirdparty%2Fbind9.git silence compiler --- diff --git a/lib/lwres/context.c b/lib/lwres/context.c index 61c43634e67..0db414c3f6c 100644 --- a/lib/lwres/context.c +++ b/lib/lwres/context.c @@ -15,7 +15,7 @@ * 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 @@ -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;