diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-05-18 07:32:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-18 07:32:31 -0700 |
commit | d5e1f7e2982c2fcc888ccac550b34095efbee217 (patch) | |
tree | d8cfe7e3f47537cce92b26a1b32b9081f0bd7993 /vendor/golang.org/x/sys/unix/syscall_darwin.go | |
parent | d3ead7dc8535f8fa5b175686cc1f7669c8b1648b (diff) | |
download | chat-d5e1f7e2982c2fcc888ccac550b34095efbee217.tar.gz chat-d5e1f7e2982c2fcc888ccac550b34095efbee217.tar.bz2 chat-d5e1f7e2982c2fcc888ccac550b34095efbee217.zip |
Upgrading server dependency. (#8807)
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_darwin.go')
-rw-r--r-- | vendor/golang.org/x/sys/unix/syscall_darwin.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 006e21f5d..693be791c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -13,7 +13,7 @@ package unix import ( - errorspkg "errors" + "errors" "syscall" "unsafe" ) @@ -98,7 +98,7 @@ type attrList struct { func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) { if len(attrBuf) < 4 { - return nil, errorspkg.New("attrBuf too small") + return nil, errors.New("attrBuf too small") } attrList.bitmapCount = attrBitMapCount @@ -134,12 +134,12 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) ( for i := uint32(0); int(i) < len(dat); { header := dat[i:] if len(header) < 8 { - return attrs, errorspkg.New("truncated attribute header") + return attrs, errors.New("truncated attribute header") } datOff := *(*int32)(unsafe.Pointer(&header[0])) attrLen := *(*uint32)(unsafe.Pointer(&header[4])) if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) { - return attrs, errorspkg.New("truncated results; attrBuf too small") + return attrs, errors.New("truncated results; attrBuf too small") } end := uint32(datOff) + attrLen attrs = append(attrs, dat[datOff:end]) |