From 9883ef81b0a3b8855a210f33147165b7fd0cb333 Mon Sep 17 00:00:00 2001 From: Hiroshi Yokoi Date: Fri, 16 Oct 2015 16:42:56 +0900 Subject: packet: remove redundancy Signed-off-by: Hiroshi Yokoi --- packet/bmp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packet/bmp.go') 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:] } -- cgit v1.2.3