diff mbox

libgo patch committed: Use delete rather than old map deletion syntax

Message ID mcr61m7cza2.fsf@iant-glaptop.roam.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor April 17, 2014, 11:27 p.m. UTC
This patch from Peter Collingbourne changes libgo to use the builtin
delete function rather than the old map deletion syntax.  Bootstrapped
and ran Go testsuite on x86_64-unknown-linux-gnu.  Committed to
mainline.

Ian
diff mbox

Patch

diff -r 1e27a38c43ea libgo/go/syscall/syscall_unix.go
--- a/libgo/go/syscall/syscall_unix.go	Thu Apr 17 16:13:05 2014 -0700
+++ b/libgo/go/syscall/syscall_unix.go	Thu Apr 17 16:17:50 2014 -0700
@@ -153,7 +153,7 @@ 
 	if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
 		return errno
 	}
-	m.active[p] = nil, false
+	delete(m.active, p)
 	return nil
 }