[PATCH 6/7] iptables: remove bogus address-of

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Casts are bad. &curtable is actually of type char (*)[], which is
quite different from what add_argv expects.

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
 ip6tables-restore.c |    2 +-
 iptables-restore.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ip6tables-restore.c b/ip6tables-restore.c
index 9948cd6..d8a45da 100644
--- a/ip6tables-restore.c
+++ b/ip6tables-restore.c
@@ -365,7 +365,7 @@ int main(int argc, char *argv[])
 
 			add_argv(argv[0]);
 			add_argv("-t");
-			add_argv((char *) &curtable);
+			add_argv(curtable);
 
 			if (counters && pcnt && bcnt) {
 				add_argv("--set-counters");
diff --git a/iptables-restore.c b/iptables-restore.c
index 519d480..cd23cfa 100644
--- a/iptables-restore.c
+++ b/iptables-restore.c
@@ -370,7 +370,7 @@ main(int argc, char *argv[])
 
 			add_argv(argv[0]);
 			add_argv("-t");
-			add_argv((char *) &curtable);
+			add_argv(curtable);
 
 			if (counters && pcnt && bcnt) {
 				add_argv("--set-counters");
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux