Commit 461260ac authored by Brian Wellington's avatar Brian Wellington
Browse files

add casts [RT #1017]

parent 67b7a9bb
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 <config.h> #include <config.h>
...@@ -692,7 +692,8 @@ client_allocsendbuf(ns_client_t *client, isc_buffer_t *buffer, ...@@ -692,7 +692,8 @@ client_allocsendbuf(ns_client_t *client, isc_buffer_t *buffer,
isc_buffer_init(buffer, data + 2, TCP_BUFFER_SIZE - 2); isc_buffer_init(buffer, data + 2, TCP_BUFFER_SIZE - 2);
} else { } else {
isc_buffer_init(buffer, data, TCP_BUFFER_SIZE); 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 { } else {
data = sendbuf; data = sendbuf;
...@@ -1301,7 +1302,7 @@ client_request(isc_task_t *task, isc_event_t *event) { ...@@ -1301,7 +1302,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
/* /*
* Get the flags out of the OPT record. * 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 */ #endif /* DNS_OPT_NEWCODES */
/* /*
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 */ /* DNS_OPT_NEWCODES_KEEP */
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#define DNS_OPTCODE_VIEW 0xfff1 #define DNS_OPTCODE_VIEW 0xfff1
#endif /* DNS_OPT_NEWCODES */ #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. * OPT records contain a series of attributes which contain different types.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment