From: David Symonds Date: Wed, 22 Apr 2009 03:24:28 +0000 (-0700) Subject: Clean up some more code after bug143 was fixed. X-Git-Tag: weekly.2009-11-06~1775 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d7240924074adafb53f4d6b77bc143d5e80b309b;p=gostls13.git Clean up some more code after bug143 was fixed. R=r APPROVED=r DELTA=6 (0 added, 5 deleted, 1 changed) OCL=27708 CL=27708 --- diff --git a/src/lib/exvar.go b/src/lib/exvar.go index 6b2aaeb7a6..d96e40aaef 100644 --- a/src/lib/exvar.go +++ b/src/lib/exvar.go @@ -166,12 +166,7 @@ func GetMapInt(name string, key string) int { var i int; var ok bool; workSync(func(state *exVars) { - // This doesn't work: - // i, ok = state.getOrInitMapVar(name)[key]; - // exvar.go:169: assignment count mismatch: 2 = 1 - // Should it? Wrapping the method call in () doesn't help. - mv := state.getOrInitMapVar(name); - i, ok = mv[key]; + i, ok = state.getOrInitMapVar(name)[key] }); return i }