Simplify code in a few places

Found by running `gosimple ./...`
This commit is contained in:
Lucas Clemente
2017-04-05 22:03:25 +01:00
parent b26d9f92b8
commit 013d7fdb30
13 changed files with 22 additions and 49 deletions

View File

@@ -413,7 +413,7 @@ func (h *cryptoSetupClient) getTags() (map[Tag][]byte, error) {
tags[TagCCS] = ccs
}
versionTag := make([]byte, 4, 4)
versionTag := make([]byte, 4)
binary.LittleEndian.PutUint32(versionTag, protocol.VersionNumberToTag(h.version))
tags[TagVER] = versionTag
@@ -431,7 +431,7 @@ func (h *cryptoSetupClient) getTags() (map[Tag][]byte, error) {
leafCert := h.certManager.GetLeafCert()
if leafCert != nil {
certHash, _ := h.certManager.GetLeafCertHash()
xlct := make([]byte, 8, 8)
xlct := make([]byte, 8)
binary.LittleEndian.PutUint64(xlct, certHash)
tags[TagNONC] = h.nonc