From 0ea82bc43e9262cdbb9880ca56bb514db4c77f8e Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sat, 7 Jun 2008 15:15:29 +0200 Subject: sparse warning fixes: integer used as pointer Signed-off-by: Patrick McHardy --- extensions/libipt_SET.c | 6 +++--- extensions/libipt_set.c | 4 ++-- extensions/libxt_CONNSECMARK.c | 4 ++-- extensions/libxt_SECMARK.c | 2 +- extensions/libxt_quota.c | 2 +- ip6tables-restore.c | 2 +- iptables-restore.c | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/extensions/libipt_SET.c b/extensions/libipt_SET.c index 378b77e4..62d959fe 100644 --- a/extensions/libipt_SET.c +++ b/extensions/libipt_SET.c @@ -34,9 +34,9 @@ static void SET_help(void) } static const struct option SET_opts[] = { - {"add-set", 1, 0, '1'}, - {"del-set", 1, 0, '2'}, - {0} + {"add-set", 1, NULL, '1'}, + {"del-set", 1, NULL, '2'}, + { } }; /* Initialize the target. */ diff --git a/extensions/libipt_set.c b/extensions/libipt_set.c index dcb74df9..759bca33 100644 --- a/extensions/libipt_set.c +++ b/extensions/libipt_set.c @@ -32,8 +32,8 @@ static void set_help(void) } static const struct option set_opts[] = { - {"set", 1, 0, '1'}, - {0} + {"set", 1, NULL, '1'}, + { } }; /* Initialize the match. */ diff --git a/extensions/libxt_CONNSECMARK.c b/extensions/libxt_CONNSECMARK.c index 579ea4c3..2c425cb8 100644 --- a/extensions/libxt_CONNSECMARK.c +++ b/extensions/libxt_CONNSECMARK.c @@ -23,8 +23,8 @@ static void CONNSECMARK_help(void) } static const struct option CONNSECMARK_opts[] = { - { "save", 0, 0, '1' }, - { "restore", 0, 0, '2' }, + { "save", 0, NULL, '1' }, + { "restore", 0, NULL, '2' }, { .name = NULL } }; diff --git a/extensions/libxt_SECMARK.c b/extensions/libxt_SECMARK.c index feee0e43..7d3dbfa2 100644 --- a/extensions/libxt_SECMARK.c +++ b/extensions/libxt_SECMARK.c @@ -22,7 +22,7 @@ static void SECMARK_help(void) } static const struct option SECMARK_opts[] = { - { "selctx", 1, 0, '1' }, + { "selctx", 1, NULL, '1' }, { .name = NULL } }; diff --git a/extensions/libxt_quota.c b/extensions/libxt_quota.c index a642aa49..8e178fe7 100644 --- a/extensions/libxt_quota.c +++ b/extensions/libxt_quota.c @@ -77,7 +77,7 @@ quota_parse(int c, char **argv, int invert, unsigned int *flags, return 1; } -struct xtables_match quota_match = { +static struct xtables_match quota_match = { .family = AF_UNSPEC, .name = "quota", .version = XTABLES_VERSION, diff --git a/ip6tables-restore.c b/ip6tables-restore.c index 9f6108a2..cd6dd032 100644 --- a/ip6tables-restore.c +++ b/ip6tables-restore.c @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) int c; char curtable[IP6T_TABLE_MAXNAMELEN + 1]; FILE *in; - const char *modprobe = 0; + const char *modprobe = NULL; int in_table = 0, testing = 0; program_name = "ip6tables-restore"; diff --git a/iptables-restore.c b/iptables-restore.c index 879683c5..4b199d94 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -124,9 +124,9 @@ main(int argc, char *argv[]) int c; char curtable[IPT_TABLE_MAXNAMELEN + 1]; FILE *in; - const char *modprobe = 0; + const char *modprobe = NULL; int in_table = 0, testing = 0; - const char *tablename = 0; + const char *tablename = NULL; program_name = "iptables-restore"; program_version = XTABLES_VERSION; -- cgit v1.2.3