From: dchenk Date: Tue, 22 May 2018 04:36:53 +0000 (-0700) Subject: encoding/base32: remove redundant conditional X-Git-Tag: go1.11beta1~361 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=faa69b906f59bfbe53c079f284fa452e82426c57;p=gostls13.git encoding/base32: remove redundant conditional Immediately following the conditional block removed here is a loop which checks exactly what the conditional already checked, so the entire conditional is redundant. Change-Id: I892fd9f2364d87e2c1cacb0407531daec6643183 Reviewed-on: https://go-review.googlesource.com/114000 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/encoding/base32/base32.go b/src/encoding/base32/base32.go index fdf42e5df3..60f25b04b2 100644 --- a/src/encoding/base32/base32.go +++ b/src/encoding/base32/base32.go @@ -96,10 +96,6 @@ func (enc Encoding) WithPadding(padding rune) *Encoding { // so Encode is not appropriate for use on individual blocks // of a large data stream. Use NewEncoder() instead. func (enc *Encoding) Encode(dst, src []byte) { - if len(src) == 0 { - return - } - for len(src) > 0 { var b [8]byte