diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-01-12 14:18:00 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-01-24 08:18:50 +0900 |
commit | 549b7037381ec51d0c5b9a0abbe8f73000fda70c (patch) | |
tree | 40ed8a74f1b75990071b79e363e331887e7db51e /client/client.go | |
parent | b391322bcbf56d623ca0a6b667c026b92f1e9e4d (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.go | 4 |
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 } |