Skip to content

Commit

Permalink
net/http: remove always true comparison
Browse files Browse the repository at this point in the history
byte is unsigned so the comparison against zero is always true.

Change-Id: I8fa60245972be362ae920507a291f92c0f9831ad
Reviewed-on: https://go-review.googlesource.com/13941
Run-TryBot: Todd Neal <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
tzneal committed Aug 26, 2015
1 parent cba1528 commit c1aee8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net/http/sniff.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (textSig) match(data []byte, firstNonWS int) string {
// c.f. section 5, step 4.
for _, b := range data[firstNonWS:] {
switch {
case 0x00 <= b && b <= 0x08,
case b <= 0x08,
b == 0x0B,
0x0E <= b && b <= 0x1A,
0x1C <= b && b <= 0x1F:
Expand Down

0 comments on commit c1aee8c

Please sign in to comment.