mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
more "declared and not used".
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
This commit is contained in:
parent
1a3198907b
commit
ca6a0fee1b
95 changed files with 221 additions and 218 deletions
|
|
@ -158,9 +158,9 @@ func (p *Cmd) Close() os.Error {
|
|||
// Loop on interrupt, but
|
||||
// ignore other errors -- maybe
|
||||
// caller has already waited for pid.
|
||||
w, err := p.Wait(0);
|
||||
_, err := p.Wait(0);
|
||||
for err == os.EINTR {
|
||||
w, err = p.Wait(0);
|
||||
_, err = p.Wait(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ func LookPath(file string) (string, os.Error) {
|
|||
return "", os.ENOENT;
|
||||
}
|
||||
pathenv := os.Getenv("PATH");
|
||||
for i, dir := range strings.Split(pathenv, ":", 0) {
|
||||
for _, dir := range strings.Split(pathenv, ":", 0) {
|
||||
if dir == "" {
|
||||
// Unix shell semantics: path element "" means "."
|
||||
dir = ".";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue