aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2017-01-17 18:23:42 +0100
committerAndrey Konovalov <andreyknvl@google.com>2017-01-18 13:07:53 +0100
commitab500f0861124519ca4001a83c4e8752c6b3f3cb (patch)
tree920061293c79117bf88ccddf8180c51d37fdf439 /sys
parent9d963ea599613fa3c2ebef9e3faaad277bab26a3 (diff)
sys: align structs with respect to align attributes
Diffstat (limited to 'sys')
-rw-r--r--sys/align.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/align.go b/sys/align.go
index 8b9e1a3c2..be0cbb3c4 100644
--- a/sys/align.go
+++ b/sys/align.go
@@ -81,7 +81,8 @@ func addAlignment(t *StructType) {
return
}
var fields []Type
- var off, align uintptr
+ var off uintptr
+ align := t.align
varLen := false
for i, f := range t.Fields {
a := f.Align()