From c03bc41f33b7095af9155b7e83ddafe379158fa0 Mon Sep 17 00:00:00 2001 From: Tom Thorogood Date: Wed, 28 Nov 2018 01:04:23 +1030 Subject: [PATCH] Remove pointless cast from unpackUint48 (#827) --- msg_helpers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msg_helpers.go b/msg_helpers.go index 81fc2b1b..a5b342e3 100644 --- a/msg_helpers.go +++ b/msg_helpers.go @@ -223,8 +223,8 @@ func unpackUint48(msg []byte, off int) (i uint64, off1 int, err error) { return 0, len(msg), &Error{err: "overflow unpacking uint64 as uint48"} } // Used in TSIG where the last 48 bits are occupied, so for now, assume a uint48 (6 bytes) - i = uint64(uint64(msg[off])<<40 | uint64(msg[off+1])<<32 | uint64(msg[off+2])<<24 | uint64(msg[off+3])<<16 | - uint64(msg[off+4])<<8 | uint64(msg[off+5])) + i = uint64(msg[off])<<40 | uint64(msg[off+1])<<32 | uint64(msg[off+2])<<24 | uint64(msg[off+3])<<16 | + uint64(msg[off+4])<<8 | uint64(msg[off+5]) off += 6 return i, off, nil }