From e7085e4751da534f2b0290df32ba06d09802a037 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 8 Jun 2019 15:50:34 +0200 Subject: [PATCH] nsscash: use WriteByte() instead of Write() with cast Less to type and easier to read. The old solution used '0' to pad instead 0. This isn't an issue as these bytes are not used. But fix it as well. --- passwd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passwd.go b/passwd.go index 1b4939c..9035190 100644 --- a/passwd.go +++ b/passwd.go @@ -137,7 +137,7 @@ func SerializePasswd(p Passwd) []byte { l := res.Len() if l%8 != 0 { for i := 0; i < 8-l%8; i++ { - res.Write([]byte{'0'}) + res.WriteByte(0) } } -- 2.45.2