summaryrefslogtreecommitdiffhomepage
path: root/packet/bmp.go
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-10-16 16:42:56 +0900
committerHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-10-16 16:42:56 +0900
commit9883ef81b0a3b8855a210f33147165b7fd0cb333 (patch)
tree6935a243b382d5324aa324123162e52cb433afe2 /packet/bmp.go
parent4c104a44c3bbf27661ba247d86a7c4bfa0cecba9 (diff)
packet: remove redundancy
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Diffstat (limited to 'packet/bmp.go')
-rw-r--r--packet/bmp.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet/bmp.go b/packet/bmp.go
index 6806de4a..587a9fd7 100644
--- a/packet/bmp.go
+++ b/packet/bmp.go
@@ -35,7 +35,7 @@ const (
)
const (
- BMP_DEFAULT_PORT = 11019
+ BMP_DEFAULT_PORT = 11019
)
const (
@@ -497,7 +497,7 @@ type BMPMessage struct {
func (msg *BMPMessage) Serialize() ([]byte, error) {
buf := make([]byte, 0)
- if msg.Header.Type != BMP_MSG_INITIATION && msg.Header.Type != BMP_MSG_INITIATION {
+ if msg.Header.Type != BMP_MSG_INITIATION {
p, err := msg.PeerHeader.Serialize()
if err != nil {
return nil, err
@@ -555,7 +555,7 @@ func ParseBMPMessage(data []byte) (*BMPMessage, error) {
msg.Body = &BMPTermination{}
}
- if msg.Header.Type != BMP_MSG_INITIATION && msg.Header.Type != BMP_MSG_INITIATION {
+ if msg.Header.Type != BMP_MSG_INITIATION {
msg.PeerHeader.DecodeFromBytes(data)
data = data[BMP_PEER_HEADER_SIZE:]
}