From: Simon Ruderich Date: Sat, 8 Jun 2019 13:50:34 +0000 (+0200) Subject: nsscash: use WriteByte() instead of Write() with cast X-Git-Tag: 0.1~85 X-Git-Url: https://ruderich.org/simon/gitweb/?p=nsscash%2Fnsscash.git;a=commitdiff_plain;h=e7085e4751da534f2b0290df32ba06d09802a037;ds=sidebyside 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. --- 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) } }