mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-06 07:20:40 -05:00
htons needs cast for win32
This commit is contained in:
parent
a14762f207
commit
db1bfc3151
1 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Id: tsig.c,v 1.107 2001/03/07 20:53:28 bwelling Exp $
|
||||
* $Id: tsig.c,v 1.108 2001/05/06 02:23:06 mayer Exp $
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
|
@ -764,7 +764,7 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg,
|
|||
* Decrement the additional field counter.
|
||||
*/
|
||||
memcpy(&addcount, &header[DNS_MESSAGE_HEADERLEN - 2], 2);
|
||||
addcount = htons(ntohs(addcount) - 1);
|
||||
addcount = htons((isc_uint16_t)(ntohs(addcount) - 1));
|
||||
memcpy(&header[DNS_MESSAGE_HEADERLEN - 2], &addcount, 2);
|
||||
|
||||
/*
|
||||
|
|
@ -1003,7 +1003,7 @@ tsig_verify_tcp(isc_buffer_t *source, dns_message_t *msg) {
|
|||
*/
|
||||
if (has_tsig) {
|
||||
memcpy(&addcount, &header[DNS_MESSAGE_HEADERLEN - 2], 2);
|
||||
addcount = htons(ntohs(addcount) - 1);
|
||||
addcount = htons((isc_uint16_t)(ntohs(addcount) - 1));
|
||||
memcpy(&header[DNS_MESSAGE_HEADERLEN - 2], &addcount, 2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue