diff --git a/common/bytes.go b/common/bytes.go
index ba00e8a4b262d8e7bbe286c62b24afb60c4bcada..e2adc80059fbe8c3805fb8a854db860a325c839e 100644
--- a/common/bytes.go
+++ b/common/bytes.go
@@ -87,15 +87,13 @@ func Hex2BytesFixed(str string, flen int) []byte {
 	h, _ := hex.DecodeString(str)
 	if len(h) == flen {
 		return h
-	} else {
-		if len(h) > flen {
-			return h[len(h)-flen:]
-		} else {
-			hh := make([]byte, flen)
-			copy(hh[flen-len(h):flen], h[:])
-			return hh
-		}
 	}
+	if len(h) > flen {
+		return h[len(h)-flen:]
+	}
+	hh := make([]byte, flen)
+	copy(hh[flen-len(h):flen], h[:])
+	return hh
 }
 
 func RightPadBytes(slice []byte, l int) []byte {