diff --git a/bin/named/client.c b/bin/named/client.c index 60cc4c236b..3b42ff463c 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: client.c,v 1.158 2001/03/11 06:19:34 marka Exp $ */ +/* $Id: client.c,v 1.159 2001/03/12 22:27:14 bwelling Exp $ */ #include @@ -692,7 +692,8 @@ client_allocsendbuf(ns_client_t *client, isc_buffer_t *buffer, isc_buffer_init(buffer, data + 2, TCP_BUFFER_SIZE - 2); } else { isc_buffer_init(buffer, data, TCP_BUFFER_SIZE); - isc_buffer_putuint16(buffer, length); + INSIST(length <= 0xffff); + isc_buffer_putuint16(buffer, (isc_uint16_t)length); } } else { data = sendbuf; @@ -1301,7 +1302,7 @@ client_request(isc_task_t *task, isc_event_t *event) { /* * Get the flags out of the OPT record. */ - client->extflags = opt->ttl & 0xFFFF; + client->extflags = (isc_uint16_t)(opt->ttl & 0xFFFF); #endif /* DNS_OPT_NEWCODES */ /* diff --git a/lib/dns/include/dns/opt.h b/lib/dns/include/dns/opt.h index 5927e95290..02519dd5e0 100644 --- a/lib/dns/include/dns/opt.h +++ b/lib/dns/include/dns/opt.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: opt.h,v 1.7 2001/01/09 21:53:09 bwelling Exp $ */ +/* $Id: opt.h,v 1.8 2001/03/12 22:27:15 bwelling Exp $ */ /* DNS_OPT_NEWCODES_KEEP */ @@ -43,7 +43,7 @@ #define DNS_OPTCODE_VIEW 0xfff1 #endif /* DNS_OPT_NEWCODES */ -#define DNS_OPT_FLAGS(opt) ((opt)->ttl & 0xFFFF) +#define DNS_OPT_FLAGS(opt) ((isc_uint16_t)((opt)->ttl & 0xFFFF)) /* * OPT records contain a series of attributes which contain different types.