diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-02-03 20:14:19 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-02-03 20:14:19 +0100 |
commit | bfbb68a71290a31d373756dc5ca8da54094875bd (patch) | |
tree | e09ad28b56dc2ec67d76816708d24fcda55a9ea7 /sys/src/9/ip | |
parent | 94282847ec07472e4f50966fdc40695d38b87931 (diff) |
ipmux: fix 6c complaints
Diffstat (limited to 'sys/src/9/ip')
-rw-r--r-- | sys/src/9/ip/ipmux.c | 14 |
1 files changed, 7 insertions, 7 deletions
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, "="); |