aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/compiler/gen.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/compiler/gen.go b/pkg/compiler/gen.go
index f357adc24..4b1b05ed1 100644
--- a/pkg/compiler/gen.go
+++ b/pkg/compiler/gen.go
@@ -167,11 +167,11 @@ func (comp *compiler) genStructDescs(syscalls []*prog.Syscall) []*prog.KeyedStru
}
sort.Slice(ctx.structs, func(i, j int) bool {
- si, sj := ctx.structs[i], ctx.structs[j]
- if si.Key.Name != sj.Key.Name {
- return si.Key.Name < sj.Key.Name
+ si, sj := ctx.structs[i].Key, ctx.structs[j].Key
+ if si.Name != sj.Name {
+ return si.Name < sj.Name
}
- return si.Key.Dir < sj.Key.Dir
+ return si.Dir < sj.Dir
})
return ctx.structs
}