From 3ca39dfc4dd8a2dda5b3a9b8c29e295839490af3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 29 Sep 2016 13:28:03 +0200 Subject: sys: add padding to structs again Struct padding was accidentially lost after: 852e3d2eae98a913b7ec91822ba4dc61059a6955 Restore it. Now with tests. Fixes #78 --- sysgen/sysgen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysgen') diff --git a/sysgen/sysgen.go b/sysgen/sysgen.go index e7a0fae00..c27e413c3 100644 --- a/sysgen/sysgen.go +++ b/sysgen/sysgen.go @@ -283,7 +283,7 @@ func generateStructs(desc *Description, consts map[string]uint64, out io.Writer) } fmt.Fprintf(out, "}\n") - fmt.Fprintf(out, "func init() {\n") + fmt.Fprintf(out, "func initStructFields() {\n") for _, str := range structArray { typ := "StructType" fields := "Fields" -- cgit mrf-deployment