net/packet: remove unnecessary mark
There's no need to mask out the bottom four bits of b[0] if we are about to shift them away.
This commit is contained in:
parent
efad55cf86
commit
b0526e8284
|
@ -111,7 +111,7 @@ func (q *Parsed) Decode(b []byte) {
|
|||
return
|
||||
}
|
||||
|
||||
q.IPVersion = (b[0] & 0xF0) >> 4
|
||||
q.IPVersion = b[0] >> 4
|
||||
switch q.IPVersion {
|
||||
case 4:
|
||||
q.decode4(b)
|
||||
|
|
Loading…
Reference in New Issue