]> git.ipfire.org Git - thirdparty/iptables.git/commit
xshared: Introduce struct argv_store
authorPhil Sutter <phil@nwl.cc>
Thu, 17 Oct 2019 21:36:47 +0000 (23:36 +0200)
committerPhil Sutter <phil@nwl.cc>
Thu, 24 Oct 2019 14:22:52 +0000 (16:22 +0200)
commit9376c42a59929031610ea70d2fc6347fbfa46e67
tree026389796b060b491903131ee8102d035c98dbfd
parentf8ec1b7a296e6f461278937213a1477e4d29b1f3
xshared: Introduce struct argv_store

The use of global variables in code around add_argv() is error-prone and
hard to follow. Replace them by a struct which functions will modify
instead of causing side-effects.

Given the lack of static variables, this effectively makes argv
construction code reentrant.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Florian Westphal <fw@strlen.de>
iptables/iptables-restore.c
iptables/iptables-xml.c
iptables/xshared.c
iptables/xshared.h
iptables/xtables-restore.c