From 6a79959258edd2392d6cf4bb3b4e9164e97cf889 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 8 Oct 1999 22:27:00 +0000 Subject: [PATCH] explicitly cast return value of dst_s_id_calc to uint16. the return value is already masked to 16 bits but the compiler is not smart enough to know that there is no loss of precision. --- lib/dns/sec/dst/dst_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dns/sec/dst/dst_support.c b/lib/dns/sec/dst/dst_support.c index 314c25c4ce..da86accb34 100644 --- a/lib/dns/sec/dst/dst_support.c +++ b/lib/dns/sec/dst/dst_support.c @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: dst_support.c,v 1.1 1999/07/12 20:08:29 bwelling Exp $ + * $Id: dst_support.c,v 1.2 1999/10/08 22:27:00 tale Exp $ */ #include @@ -81,7 +81,7 @@ dst_s_id_calc(const unsigned char *key, const int keysize) ac += ((*kp) << 8); ac += (ac >> 16) & 0xffff; - return (ac & 0xffff); + return ((isc_uint16_t)(ac & 0xffff)); } /*