From bfbb68a71290a31d373756dc5ca8da54094875bd Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 3 Feb 2014 20:14:19 +0100 Subject: ipmux: fix 6c complaints --- sys/src/9/ip/ipmux.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/src') diff --git a/sys/src/9/ip/ipmux.c b/sys/src/9/ip/ipmux.c index d8fb35225..ef45ea0ac 100644 --- a/sys/src/9/ip/ipmux.c +++ b/sys/src/9/ip/ipmux.c @@ -128,13 +128,13 @@ parseop(char **pp) p = skipwhite(p); if(strncmp(p, "dst", 3) == 0){ type = Tdst; - off = (ulong)(ipoff->dst); + off = (int)(uintptr)(ipoff->dst); len = IPv4addrlen; p += 3; } else if(strncmp(p, "src", 3) == 0){ type = Tsrc; - off = (ulong)(ipoff->src); + off = (int)(uintptr)(ipoff->src); len = IPv4addrlen; p += 3; } @@ -146,7 +146,7 @@ parseop(char **pp) } else if(strncmp(p, "proto", 5) == 0){ type = Tproto; - off = (ulong)&(ipoff->proto); + off = (int)(uintptr)&(ipoff->proto); len = 1; p += 5; } @@ -346,8 +346,8 @@ ipmuxcmp(Ipmux *a, Ipmux *b) return n; /* compare offsets, call earlier ones more specific */ - n = (a->off+((int)a->skiphdr)*(ulong)ipoff->data) - - (b->off+((int)b->skiphdr)*(ulong)ipoff->data); + n = (a->off+((int)a->skiphdr)*(int)(uintptr)ipoff->data) - + (b->off+((int)b->skiphdr)*(int)(uintptr)ipoff->data); if(n != 0) return n; @@ -782,8 +782,8 @@ ipmuxsprint(Ipmux *mux, int level, char *buf, int len) return n; } n += snprint(buf+n, len-n, "h[%d:%d]&", - mux->off+((int)mux->skiphdr)*((int)ipoff->data), - mux->off+(((int)mux->skiphdr)*((int)ipoff->data))+mux->len-1); + mux->off+((int)mux->skiphdr)*((int)(uintptr)ipoff->data), + mux->off+(((int)mux->skiphdr)*((int)(uintptr)ipoff->data))+mux->len-1); for(i = 0; i < mux->len; i++) n += snprint(buf+n, len - n, "%2.2ux", mux->mask[i]); n += snprint(buf+n, len-n, "="); -- cgit v1.2.3