]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler
authorMark Andrews <marka@isc.org>
Fri, 17 Sep 2004 05:59:28 +0000 (05:59 +0000)
committerMark Andrews <marka@isc.org>
Fri, 17 Sep 2004 05:59:28 +0000 (05:59 +0000)
lib/lwres/context.c

index 61c43634e678fafc27389fdce129e5dc666afe81..0db414c3f6c8e6e8719e54fd5882086ce5c44552 100644 (file)
@@ -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 <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;