diff options
author | Brian Carlstrom <bdc@google.com> | 2014-02-24 20:03:01 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2014-02-24 21:14:51 -0800 |
commit | fcac410fa15613873a07143ccd46470b869346a3 (patch) | |
tree | a76ca896fc7cb5801acf16edfcfd7f3bb6962014 /ipv4.c | |
parent | f3beefc96a5a4f295562f60d648bd6e795980a10 (diff) | |
download | android_external_android-clat-fcac410fa15613873a07143ccd46470b869346a3.tar.gz android_external_android-clat-fcac410fa15613873a07143ccd46470b869346a3.tar.bz2 android_external_android-clat-fcac410fa15613873a07143ccd46470b869346a3.zip |
Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds
Change-Id: Ib61e67f15360c27c3ebf61f870a9482217c52357
Diffstat (limited to 'ipv4.c')
-rw-r--r-- | ipv4.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -33,7 +33,7 @@ */ int icmp_packet(clat_packet out, int pos, const struct icmphdr *icmp, uint32_t checksum, size_t len) { - const char *payload; + const uint8_t *payload; size_t payload_size; if(len < sizeof(struct icmphdr)) { @@ -41,7 +41,7 @@ int icmp_packet(clat_packet out, int pos, const struct icmphdr *icmp, uint32_t c return 0; } - payload = (const char *) (icmp + 1); + payload = (const uint8_t *) (icmp + 1); payload_size = len - sizeof(struct icmphdr); return icmp_to_icmp6(out, pos, icmp, checksum, payload, payload_size); @@ -54,13 +54,13 @@ int icmp_packet(clat_packet out, int pos, const struct icmphdr *icmp, uint32_t c * len - size of packet * returns: the highest position in the output clat_packet that's filled in */ -int ipv4_packet(clat_packet out, int pos, const char *packet, size_t len) { +int ipv4_packet(clat_packet out, int pos, const uint8_t *packet, size_t len) { const struct iphdr *header = (struct iphdr *) packet; struct ip6_hdr *ip6_targ = (struct ip6_hdr *) out[pos].iov_base; struct ip6_frag *frag_hdr; size_t frag_hdr_len; uint8_t nxthdr; - const char *next_header; + const uint8_t *next_header; size_t len_left; uint32_t old_sum, new_sum; int iov_len; |