dnsapi: Remove unneeded casts.

This commit is contained in:
Andrew Talbot 2007-12-10 22:03:24 +00:00 committed by Alexandre Julliard
parent 2702da6977
commit 1a1d0a3ec1
2 changed files with 8 additions and 8 deletions

View File

@ -51,7 +51,7 @@ static void setsection(ns_msg *msg, ns_sect sect);
#endif
#define DNS_NS_GET16(s, cp) do { \
register const u_char *t_cp = (const u_char *)(cp); \
register const u_char *t_cp = (cp); \
(s) = ((WORD)t_cp[0] << 8) \
| ((WORD)t_cp[1]) \
; \
@ -59,7 +59,7 @@ static void setsection(ns_msg *msg, ns_sect sect);
} while (0)
#define DNS_NS_GET32(l, cp) do { \
register const u_char *t_cp = (const u_char *)(cp); \
register const u_char *t_cp = (cp); \
(l) = ((DWORD)t_cp[0] << 24) \
| ((DWORD)t_cp[1] << 16) \
| ((DWORD)t_cp[2] << 8) \

View File

@ -279,13 +279,13 @@ static DNS_STATUS dns_copy_rdata( ns_msg msg, const ns_rr *rr, DNS_RECORDA *r, W
{
/* FIXME: byte order? */
r->Data.KEY.wFlags = *(const WORD *)pos; pos += sizeof(WORD);
r->Data.KEY.chProtocol = *(const BYTE *)pos++;
r->Data.KEY.chAlgorithm = *(const BYTE *)pos++;
r->Data.KEY.chProtocol = *pos++;
r->Data.KEY.chAlgorithm = *pos++;
size = rr->rdata + rr->rdlength - pos;
for (i = 0; i < size; i++)
r->Data.KEY.Key[i] = *(const BYTE *)pos++;
r->Data.KEY.Key[i] = *pos++;
*dlen = sizeof(DNS_KEY_DATA) + (size - 1) * sizeof(BYTE);
break;
@ -353,8 +353,8 @@ static DNS_STATUS dns_copy_rdata( ns_msg msg, const ns_rr *rr, DNS_RECORDA *r, W
/* FIXME: byte order? */
r->Data.SIG.wTypeCovered = *(const WORD *)pos; pos += sizeof(WORD);
r->Data.SIG.chAlgorithm = *(const BYTE *)pos++;
r->Data.SIG.chLabelCount = *(const BYTE *)pos++;
r->Data.SIG.chAlgorithm = *pos++;
r->Data.SIG.chLabelCount = *pos++;
r->Data.SIG.dwOriginalTtl = *(const DWORD *)pos; pos += sizeof(DWORD);
r->Data.SIG.dwExpiration = *(const DWORD *)pos; pos += sizeof(DWORD);
r->Data.SIG.dwTimeSigned = *(const DWORD *)pos; pos += sizeof(DWORD);
@ -363,7 +363,7 @@ static DNS_STATUS dns_copy_rdata( ns_msg msg, const ns_rr *rr, DNS_RECORDA *r, W
size = rr->rdata + rr->rdlength - pos;
for (i = 0; i < size; i++)
r->Data.SIG.Signature[i] = *(const BYTE *)pos++;
r->Data.SIG.Signature[i] = *pos++;
*dlen = sizeof(DNS_SIG_DATAA) + (size - 1) * sizeof(BYTE);
break;