diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-01-05 20:20:22 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-01-05 20:20:22 +0000 |
commit | 90a33596b57c294180eb8b8e074e4803cc5ed84c (patch) | |
tree | 45b3702f63d0cbf1e0982874fa1d27fb41a320b0 /src/dns | |
parent | 0f5b6b10710fb13c309cd1f35fb20b3faed44184 (diff) |
-remove useless casts
git-svn-id: https://gnunet.org/svn/gnunet@19018 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/dns')
-rw-r--r-- | src/dns/gnunet-service-dns_new.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dns/gnunet-service-dns_new.c b/src/dns/gnunet-service-dns_new.c index a74bccabdd..046630aac7 100644 --- a/src/dns/gnunet-service-dns_new.c +++ b/src/dns/gnunet-service-dns_new.c @@ -482,21 +482,21 @@ request_done (struct RequestRecord *rr) ip.checksum = 0; /* checksum is optional */ ip.source_address = dst->sin_addr; ip.destination_address = src->sin_addr; - ip.checksum = GNUNET_CRYPTO_crc16_n ((uint16_t*) &ip, sizeof (ip)); + ip.checksum = GNUNET_CRYPTO_crc16_n (&ip, sizeof (ip)); udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, - (uint16_t *) &ip.source_address, + &ip.source_address, sizeof (struct in_addr) * 2); { uint16_t tmp; tmp = htons (IPPROTO_UDP); udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, - (uint16_t *) &tmp, + &tmp, sizeof (uint16_t)); tmp = htons (rr->payload_length + sizeof (struct udp_packet)); udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, - (uint16_t *) &tmp, + &tmp, sizeof (uint16_t)); } memcpy (&buf[off], &ip, sizeof (ip)); @@ -521,18 +521,18 @@ request_done (struct RequestRecord *rr) ip.source_address = dst->sin6_addr; ip.destination_address = src->sin6_addr; udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, - (uint16_t *) &ip.source_address, + &ip.source_address, sizeof (struct in6_addr) * 2); { uint32_t tmp; tmp = htons (rr->payload_length + sizeof (struct udp_packet)); udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, - (uint16_t *) &tmp, + &tmp, sizeof (uint32_t)); tmp = htons (IPPROTO_UDP); udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, - (uint16_t *) &tmp, + &tmp, sizeof (uint32_t)); } memcpy (&buf[off], &ip, sizeof (ip)); @@ -552,10 +552,10 @@ request_done (struct RequestRecord *rr) udp.len = htons (reply_len - off); udp.crc = 0; udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, - (uint16_t *) &udp, + &udp, sizeof (udp)); udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, - (uint16_t *) rr->payload, + rr->payload, rr->payload_length); udp.crc = GNUNET_CRYPTO_crc16_finish (udp_crc_sum); memcpy (&buf[off], &udp, sizeof (udp)); |