diff options
author | Adin Scannell <ascannell@google.com> | 2020-03-25 16:55:02 -0700 |
---|---|---|
committer | Adin Scannell <ascannell@google.com> | 2020-04-08 10:00:14 -0700 |
commit | 94b793262d3c54b4c32fed83d2bd121069680d15 (patch) | |
tree | c89f8101c0a39d419f21793afbd38e9eb8f64840 /tools/go_stateify | |
parent | 71c7e24e5cb8641f4cb98b5fc848ae2033b29eac (diff) |
Fix all copy locks violations.
This required minor restructuring of how system call tables were saved
and restored, but it makes way more sense this way.
Updates #2243
Diffstat (limited to 'tools/go_stateify')
-rw-r--r-- | tools/go_stateify/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/go_stateify/main.go b/tools/go_stateify/main.go index 3437aa476..309ee9c21 100644 --- a/tools/go_stateify/main.go +++ b/tools/go_stateify/main.go @@ -206,7 +206,7 @@ func main() { initCalls = append(initCalls, fmt.Sprintf("%sRegister(\"%s.%s\", (*%s)(nil), state.Fns{Save: (*%s).save, Load: (*%s).load})", statePrefix, *fullPkg, name, name, name, name)) } emitZeroCheck := func(name string) { - fmt.Fprintf(outputFile, " if !%sIsZeroValue(x.%s) { m.Failf(\"%s is %%v, expected zero\", x.%s) }\n", statePrefix, name, name, name) + fmt.Fprintf(outputFile, " if !%sIsZeroValue(&x.%s) { m.Failf(\"%s is %%#v, expected zero\", &x.%s) }\n", statePrefix, name, name, name) } emitLoadValue := func(name, typName string) { fmt.Fprintf(outputFile, " m.LoadValue(\"%s\", new(%s), func(y interface{}) { x.load%s(y.(%s)) })\n", name, typName, camelCased(name), typName) |