summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.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 /server/fsm.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 'server/fsm.go')
-rw-r--r--server/fsm.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/server/fsm.go b/server/fsm.go
index c3c2910e..9db3a552 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -17,19 +17,21 @@ package server
import (
"fmt"
- "github.com/eapache/channels"
- "github.com/osrg/gobgp/config"
- "github.com/osrg/gobgp/packet/bgp"
- "github.com/osrg/gobgp/packet/bmp"
- "github.com/osrg/gobgp/table"
- log "github.com/sirupsen/logrus"
- "gopkg.in/tomb.v2"
"io"
"math/rand"
"net"
"strconv"
"strings"
"time"
+
+ "github.com/eapache/channels"
+ log "github.com/sirupsen/logrus"
+ "gopkg.in/tomb.v2"
+
+ "github.com/osrg/gobgp/config"
+ "github.com/osrg/gobgp/packet/bgp"
+ "github.com/osrg/gobgp/packet/bmp"
+ "github.com/osrg/gobgp/table"
)
type FsmStateReason string
@@ -272,7 +274,7 @@ func hostport(addr net.Addr) (string, uint16) {
if err != nil {
return "", 0
}
- p, _ := strconv.Atoi(port)
+ p, _ := strconv.ParseUint(port, 10, 16)
return host, uint16(p)
}
return "", 0