ipmux: fix 6c complaints
This commit is contained in:
parent
94282847ec
commit
bfbb68a712
1 changed files with 7 additions and 7 deletions
|
@ -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, "=");
|
||||
|
|
Loading…
Reference in a new issue