fix several linter warnings and misspellings

This commit is contained in:
Marten Seemann
2016-05-02 16:33:32 +07:00
parent ce57f008e4
commit ad467ade58
9 changed files with 12 additions and 7 deletions

View File

@@ -188,7 +188,7 @@ func ParseAckFrame(r *bytes.Reader) (*AckFrame, error) {
}
// Invalid NACK Handling:
// NACKs contain a lot of offsets that require substractions of PacketNumbers. If an ACK contains invalid data, it is possible to underflow the uint64 used to store the PacketNumber
// NACKs contain a lot of offsets that require subtractions of PacketNumbers. If an ACK contains invalid data, it is possible to underflow the uint64 used to store the PacketNumber
// TODO: handle uint64 overflows
if hasNACK {
var numRanges uint8

View File

@@ -13,7 +13,7 @@ func (n *NackRange) Len() uint64 {
return uint64(n.LastPacketNumber) - uint64(n.FirstPacketNumber)
}
// IsInRange checks if a packetNumber is contained in a NACK range
// ContainsPacketNumber checks if a packetNumber is contained in a NACK range
func (n *NackRange) ContainsPacketNumber(packetNumber protocol.PacketNumber) bool {
if packetNumber >= n.FirstPacketNumber && packetNumber <= n.LastPacketNumber {
return true