gofix -r mapdelete
R=golang-dev, r, adg, r, cw
CC=golang-dev
https://golang.org/cl/5266045
diff --git a/src/pkg/net/fd.go b/src/pkg/net/fd.go
index e46e120..80d40af 100644
--- a/src/pkg/net/fd.go
+++ b/src/pkg/net/fd.go
@@ -152,7 +152,7 @@
if !ok {
return nil
}
- s.pending[key] = nil, false
+ delete(s.pending, key)
return netfd
}
@@ -195,7 +195,7 @@
}
if t > 0 {
if t <= now {
- s.pending[key] = nil, false
+ delete(s.pending, key)
if mode == 'r' {
s.poll.DelFD(fd.sysfd, mode)
fd.rdeadline = -1
diff --git a/src/pkg/net/fd_linux.go b/src/pkg/net/fd_linux.go
index 70fc344..c860c84 100644
--- a/src/pkg/net/fd_linux.go
+++ b/src/pkg/net/fd_linux.go
@@ -105,7 +105,7 @@
if e := syscall.EpollCtl(p.epfd, syscall.EPOLL_CTL_DEL, fd, nil); e != 0 {
print("Epoll delete fd=", fd, ": ", os.Errno(e).String(), "\n")
}
- p.events[fd] = 0, false
+ delete(p.events, fd)
}
}
diff --git a/src/pkg/net/textproto/header.go b/src/pkg/net/textproto/header.go
index 288deb2..7fb32f8 100644
--- a/src/pkg/net/textproto/header.go
+++ b/src/pkg/net/textproto/header.go
@@ -39,5 +39,5 @@
// Del deletes the values associated with key.
func (h MIMEHeader) Del(key string) {
- h[CanonicalMIMEHeaderKey(key)] = nil, false
+ delete(h, CanonicalMIMEHeaderKey(key))
}
diff --git a/src/pkg/net/textproto/pipeline.go b/src/pkg/net/textproto/pipeline.go
index 8c25884..ca50edd 100644
--- a/src/pkg/net/textproto/pipeline.go
+++ b/src/pkg/net/textproto/pipeline.go
@@ -108,7 +108,7 @@
}
c, ok := s.wait[id]
if ok {
- s.wait[id] = nil, false
+ delete(s.wait, id)
}
s.mu.Unlock()
if ok {