]> Cypherpunks repositories - gostls13.git/commit
net: fix undetected set and not used error
authorDave Cheney <dave@cheney.net>
Tue, 2 Jun 2015 01:04:45 +0000 (11:04 +1000)
committerDave Cheney <dave@cheney.net>
Tue, 2 Jun 2015 05:35:29 +0000 (05:35 +0000)
commitf6d43b746a683b63f93999f07a27db79be1ca146
treed5bbc1385ff77a6c7cc3faa7402f6466979aff2c
parent1831e1ec3725c987c42aef81264433a219756226
net: fix undetected set and not used error

Fixes an error where the compiler did not spot that the shadowed err
value was set again after being read. That second assignment was lost
as the value was redeclared in an inner scope.

Spotted by Gordon Klass, https://groups.google.com/forum/#!topic/golang-nuts/MdDLbvOjb4o

Change-Id: I28f2da6f98c52afcbb45e17d2b4f36c586598f98
Reviewed-on: https://go-review.googlesource.com/10600
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
src/net/file_unix.go