summaryrefslogtreecommitdiffhomepage
path: root/client/client.go
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2018-01-12 14:18:00 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-01-24 08:18:50 +0900
commit549b7037381ec51d0c5b9a0abbe8f73000fda70c (patch)
tree40ed8a74f1b75990071b79e363e331887e7db51e /client/client.go
parentb391322bcbf56d623ca0a6b667c026b92f1e9e4d (diff)
*: Use strconv.ParseUint instead of strconv.Atoi()
For the 32-bit platform compatibility. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'client/client.go')
-rw-r--r--client/client.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/client.go b/client/client.go
index 50d55319..4cd22526 100644
--- a/client/client.go
+++ b/client/client.go
@@ -818,7 +818,9 @@ func (cli *Client) GetRPKI() ([]*config.RpkiServer, error) {
}
servers := make([]*config.RpkiServer, 0, len(rsp.Servers))
for _, s := range rsp.Servers {
- port, err := strconv.Atoi(s.Conf.RemotePort)
+ // Note: RpkiServerConfig.Port is uint32 type, but the TCP/UDP port is
+ // 16-bit length.
+ port, err := strconv.ParseUint(s.Conf.RemotePort, 10, 16)
if err != nil {
return nil, err
}