From 890bcb2adef3a7303dea28d31d3fb475a7bbfc6e Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Sat, 2 May 2020 00:38:31 +0200 Subject: [PATCH] tlv: fix comments for numLeadingZeroBytes{32,64} funcs --- tlv/truncated.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tlv/truncated.go b/tlv/truncated.go index 930a2cce..017acc04 100644 --- a/tlv/truncated.go +++ b/tlv/truncated.go @@ -67,7 +67,7 @@ func DTUint16(r io.Reader, val interface{}, buf *[8]byte, l uint64) error { return NewTypeForDecodingErr(val, "uint16", l, 2) } -// numLeadingZeroBytes16 computes the number of leading zeros for a uint32. +// numLeadingZeroBytes32 computes the number of leading zeros for a uint32. func numLeadingZeroBytes32(v uint32) uint64 { switch { case v == 0: @@ -128,7 +128,7 @@ func DTUint32(r io.Reader, val interface{}, buf *[8]byte, l uint64) error { return NewTypeForDecodingErr(val, "uint32", l, 4) } -// numLeadingZeroBytes64 computes the number of leading zeros for a uint32. +// numLeadingZeroBytes64 computes the number of leading zeros for a uint64. // // TODO(conner): optimize using unrolled binary search func numLeadingZeroBytes64(v uint64) uint64 {