dnsapi: Remove unneeded casts
Andrew Talbot
andrew.talbot at talbotville.com
Mon Dec 10 16:03:24 CST 2007
Changelog:
dnsapi: Remove unneeded casts.
diff --git a/dlls/dnsapi/ns_parse.c b/dlls/dnsapi/ns_parse.c
index 6786909..b5884bf 100644
--- a/dlls/dnsapi/ns_parse.c
+++ b/dlls/dnsapi/ns_parse.c
@@ -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) \
diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c
index 60e7456..7ca08a0 100644
--- a/dlls/dnsapi/query.c
+++ b/dlls/dnsapi/query.c
@@ -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;
More information about the wine-patches
mailing list