From d01454062d0265f118c1b721740997cb93ef8cdb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 30 Jul 2007 14:32:26 +0000 Subject: Makes it possible to omit extra_opts of matches/targets if unnecessary. (Jan Engelhardt ) A nice side effect is that merge_option() doesn't copy options in that case. --- iptables.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'iptables.c') diff --git a/iptables.c b/iptables.c index b894f6a2..78ac13c3 100644 --- a/iptables.c +++ b/iptables.c @@ -853,6 +853,9 @@ merge_options(struct option *oldopts, const struct option *newopts, unsigned int num_old, num_new, i; struct option *merge; + if (newopts == NULL) + return oldopts; + for (num_old = 0; oldopts[num_old].name; num_old++); for (num_new = 0; newopts[num_new].name; num_new++); -- cgit v1.2.3