aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/syscall_unix.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net> 2017-12-16 11:25:18 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net> 2017-12-16 11:25:18 -0800
commit27196589fbd36f5f840e51b59bd6253d0f865db3 (patch)
tree4896268c735528045e4064ace92a2a75280585b8 /vendor/golang.org/x/sys/unix/syscall_unix.go
parent231ebf2daa9c024fbe99277f57935444946824bd (diff)
downloadv2-27196589fbd36f5f840e51b59bd6253d0f865db3.tar.gz
v2-27196589fbd36f5f840e51b59bd6253d0f865db3.tar.zst
v2-27196589fbd36f5f840e51b59bd6253d0f865db3.zip
Add FeedIcon API call and update dependencies
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_unix.go')
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index 3ed8a91f..35c1cd5c 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 {