Skip to content
Snippets Groups Projects
Commit 198ac999 authored by Christoph Petrausch's avatar Christoph Petrausch
Browse files

Streamline bitwise flag check

parent 7771cc42
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ func (p *PeerIndexTableEntry) Decode(data *bytes.Buffer) error {
} else {
p.IPSizeBytes = 4
}
if (flags>>1)&1 == 1 { // 6th bit is set
if flags&2 == 2 { // 6th bit is set
p.ASSizeBytes = 2
} else {
p.ASSizeBytes = 4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment