From 232439191ca4efcbfb57d4448695ad1f2744ffa2 Mon Sep 17 00:00:00 2001 From: ngaut Date: Mon, 30 Nov 2015 20:13:29 +0800 Subject: [PATCH] tools: Fix shadow variables and incorrect printing format. --- tools/etcd-top/etcd-top.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/etcd-top/etcd-top.go b/tools/etcd-top/etcd-top.go index ebc34484d..e24ab67e3 100644 --- a/tools/etcd-top/etcd-top.go +++ b/tools/etcd-top/etcd-top.go @@ -166,9 +166,9 @@ func main() { ports := []uint16{} for _, p := range strings.Split(*portsArg, ",") { - p, err := strconv.Atoi(p) + port, err := strconv.Atoi(p) if err == nil { - ports = append(ports, uint16(p)) + ports = append(ports, uint16(port)) } else { fmt.Fprintf(os.Stderr, "Failed to parse port \"%s\": %v\n", p, err) os.Exit(1)