Update netlink vendoring (#1471)

* github.com/ema/qdisc
* github.com/mdlayher/genetlink
* github.com/mdlayher/wifi

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2019-09-05 15:35:13 +02:00 committed by GitHub
commit 0e77317955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
245 changed files with 6515 additions and 1699 deletions

View file

@ -10,5 +10,9 @@ func Bytes(s string) []byte {
// String returns a string with the contents of b from a null-terminated
// byte slice.
func String(b []byte) string {
return string(bytes.TrimSuffix(b, []byte{0x00}))
// If the string has more than one NULL terminator byte, we want to remove
// all of them before returning the string to the caller; hence the use of
// strings.TrimRight instead of strings.TrimSuffix (which previously only
// removed a single NULL).
return string(bytes.TrimRight(b, "\x00"))
}