]> Cypherpunks repositories - gostls13.git/commit
image/png: remove too early declaration of "n"
authorAyan George <ayan@ayan.net>
Fri, 8 May 2020 04:13:44 +0000 (00:13 -0400)
committerRob Pike <r@golang.org>
Fri, 8 May 2020 22:01:08 +0000 (22:01 +0000)
commitc844fec7f6097289abb657d9a334cce97786c48c
tree2feda3715f7f60caf4232736d7cb3ed7d40bb178
parent7cfa7d69259590319524c3715df4a39b39924bc3
image/png: remove too early declaration of "n"

Before this commit, the code declares and assigns "n" with the result of
io.ReadFull() -- but the value is not used.  The variable is then reused
later in the function.

This commit removes the first declaration of "n" and declares it closer
to where it is used.

Change-Id: I7ffe19a10f2a563c306bb6fe6562493435b9dc5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/232917
Reviewed-by: Rob Pike <r@golang.org>
src/image/png/reader.go