aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-02-18 13:49:48 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-02-19 21:48:20 +0100
commit85d1218f4108e0fe793f63e57e2edadd5da5764f (patch)
tree2b8cbd8c476cd0f21d1add6bc74d0ca5bb9dec46 /sys/linux
parent2be2288ee256f3b84a7de15b82894097a08fd939 (diff)
prog: rework foreachArg
Make Foreach* callback accept the arg and a context struct that can contain lots of aux info. This (1) removes lots of unuser base/parent args, (2) provides foundation for stopping recursion, (3) allows to merge foreachSubargOffset.
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/init_iptables.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/linux/init_iptables.go b/sys/linux/init_iptables.go
index 89604e0b1..d0e776045 100644
--- a/sys/linux/init_iptables.go
+++ b/sys/linux/init_iptables.go
@@ -85,7 +85,7 @@ func (arch *arch) generateNetfilterTable(g *prog.Gen, typ prog.Type, old prog.Ar
hookArg.Val = pos
}
// Now update standard target jump offsets.
- prog.ForeachSubarg(arg, func(arg, _ prog.Arg, _ *[]prog.Arg) {
+ prog.ForeachSubArg(arg, func(arg prog.Arg, _ *prog.ArgCtx) {
if !strings.HasPrefix(arg.Type().Name(), `xt_target_t["", `) {
return
}