From 2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 16 Jan 2018 12:03:31 -0500 Subject: Updated dependencies and added avct/uasurfer (#8089) * Updated dependencies and added avct/uasurfer * Added uasurfer to NOTICE.txt --- vendor/golang.org/x/sys/unix/syscall_unix.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'vendor/golang.org/x/sys/unix/syscall_unix.go') diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 3ed8a91f5..35c1cd5ca 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -50,6 +50,17 @@ func errnoErr(e syscall.Errno) error { return e } +// clen returns the index of the first NULL byte in n or len(n) if n contains no +// NULL byte or len(n) if n contains no NULL byte +func clen(n []byte) int { + for i := 0; i < len(n); i++ { + if n[i] == 0 { + return i + } + } + return len(n) +} + // Mmap manager, for use by operating system-specific implementations. type mmapper struct { -- cgit v1.2.3-1-g7c22