diff options
Diffstat (limited to 'src/pkg/os')
-rw-r--r-- | src/pkg/os/env.go | 2 | ||||
-rw-r--r-- | src/pkg/os/exec.go | 2 | ||||
-rw-r--r-- | src/pkg/os/file.go | 4 | ||||
-rw-r--r-- | src/pkg/os/stat_darwin.go | 2 | ||||
-rw-r--r-- | src/pkg/os/stat_freebsd.go | 2 | ||||
-rw-r--r-- | src/pkg/os/stat_linux.go | 2 | ||||
-rw-r--r-- | src/pkg/os/stat_nacl.go | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/src/pkg/os/env.go b/src/pkg/os/env.go index 071db0d1d..c1713586d 100644 --- a/src/pkg/os/env.go +++ b/src/pkg/os/env.go @@ -21,7 +21,7 @@ func copyenv() { for _, s := range Envs { for j := 0; j < len(s); j++ { if s[j] == '=' { - env[s[0:j]] = s[j+1 : len(s)]; + env[s[0:j]] = s[j+1:]; break; } } diff --git a/src/pkg/os/exec.go b/src/pkg/os/exec.go index 3797d80db..6525f254e 100644 --- a/src/pkg/os/exec.go +++ b/src/pkg/os/exec.go @@ -119,7 +119,7 @@ func itod(i int) string { b[bp] = '-'; } - return string(b[bp:len(b)]); + return string(b[bp:]); } func (w Waitmsg) String() string { diff --git a/src/pkg/os/file.go b/src/pkg/os/file.go index bc7f02ef9..dc722055a 100644 --- a/src/pkg/os/file.go +++ b/src/pkg/os/file.go @@ -146,7 +146,7 @@ func (file *File) ReadAt(b []byte, off int64) (n int, err Error) { err = &PathError{"read", file.name, Errno(e)}; break; } - b = b[m:len(b)]; + b = b[m:]; off += int64(m); } return; @@ -191,7 +191,7 @@ func (file *File) WriteAt(b []byte, off int64) (n int, err Error) { err = &PathError{"write", file.name, Errno(e)}; break; } - b = b[m:len(b)]; + b = b[m:]; off += int64(m); } return; diff --git a/src/pkg/os/stat_darwin.go b/src/pkg/os/stat_darwin.go index 1bdd37113..857c9068d 100644 --- a/src/pkg/os/stat_darwin.go +++ b/src/pkg/os/stat_darwin.go @@ -26,7 +26,7 @@ func dirFromStat(name string, dir *Dir, lstat, stat *syscall.Stat_t) *Dir { dir.Ctime_ns = uint64(syscall.TimespecToNsec(stat.Ctimespec)); for i := len(name) - 1; i >= 0; i-- { if name[i] == '/' { - name = name[i+1 : len(name)]; + name = name[i+1:]; break; } } diff --git a/src/pkg/os/stat_freebsd.go b/src/pkg/os/stat_freebsd.go index d2630d72d..c28f97689 100644 --- a/src/pkg/os/stat_freebsd.go +++ b/src/pkg/os/stat_freebsd.go @@ -26,7 +26,7 @@ func dirFromStat(name string, dir *Dir, lstat, stat *syscall.Stat_t) *Dir { dir.Ctime_ns = uint64(syscall.TimespecToNsec(stat.Ctimespec)); for i := len(name) - 1; i >= 0; i-- { if name[i] == '/' { - name = name[i+1 : len(name)]; + name = name[i+1:]; break; } } diff --git a/src/pkg/os/stat_linux.go b/src/pkg/os/stat_linux.go index e19725b22..a947b5802 100644 --- a/src/pkg/os/stat_linux.go +++ b/src/pkg/os/stat_linux.go @@ -26,7 +26,7 @@ func dirFromStat(name string, dir *Dir, lstat, stat *syscall.Stat_t) *Dir { dir.Ctime_ns = uint64(syscall.TimespecToNsec(stat.Ctim)); for i := len(name) - 1; i >= 0; i-- { if name[i] == '/' { - name = name[i+1 : len(name)]; + name = name[i+1:]; break; } } diff --git a/src/pkg/os/stat_nacl.go b/src/pkg/os/stat_nacl.go index 9a66c671e..8cad9c944 100644 --- a/src/pkg/os/stat_nacl.go +++ b/src/pkg/os/stat_nacl.go @@ -26,7 +26,7 @@ func dirFromStat(name string, dir *Dir, lstat, stat *syscall.Stat_t) *Dir { dir.Ctime_ns = uint64(stat.Ctime) * 1e9; for i := len(name) - 1; i >= 0; i-- { if name[i] == '/' { - name = name[i+1 : len(name)]; + name = name[i+1:]; break; } } |