summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-02-24 20:03:01 -0800
committerBrian Carlstrom <bdc@google.com>2014-02-24 21:14:51 -0800
commitfcac410fa15613873a07143ccd46470b869346a3 (patch)
treea76ca896fc7cb5801acf16edfcfd7f3bb6962014 /ipv6.c
parentf3beefc96a5a4f295562f60d648bd6e795980a10 (diff)
downloadandroid_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 'ipv6.c')
-rw-r--r--ipv6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipv6.c b/ipv6.c
index 2e83be1..d519e1b 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -35,7 +35,7 @@
* returns: the highest position in the output clat_packet that's filled in
*/
int icmp6_packet(clat_packet out, int pos, const struct icmp6_hdr *icmp6, size_t len) {
- const char *payload;
+ const uint8_t *payload;
size_t payload_size;
if(len < sizeof(struct icmp6_hdr)) {
@@ -43,7 +43,7 @@ int icmp6_packet(clat_packet out, int pos, const struct icmp6_hdr *icmp6, size_t
return 0;
}
- payload = (const char *) (icmp6 + 1);
+ payload = (const uint8_t *) (icmp6 + 1);
payload_size = len - sizeof(struct icmp6_hdr);
return icmp6_to_icmp(out, pos, icmp6, payload, payload_size);
@@ -74,12 +74,12 @@ void log_bad_address(const char *fmt, const struct in6_addr *src, const struct i
* len - size of packet
* returns: the highest position in the output clat_packet that's filled in
*/
-int ipv6_packet(clat_packet out, int pos, const char *packet, size_t len) {
+int ipv6_packet(clat_packet out, int pos, const uint8_t *packet, size_t len) {
const struct ip6_hdr *ip6 = (struct ip6_hdr *) packet;
struct iphdr *ip_targ = (struct iphdr *) out[pos].iov_base;
struct ip6_frag *frag_hdr = NULL;
uint8_t protocol;
- const char *next_header;
+ const uint8_t *next_header;
size_t len_left;
uint32_t old_sum, new_sum;
int iov_len;