]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
sparse warning fixes: integer used as pointer
authorPatrick McHardy <kaber@trash.net>
Sat, 7 Jun 2008 13:15:29 +0000 (15:15 +0200)
committerPatrick McHardy <kaber@trash.net>
Sat, 7 Jun 2008 13:15:29 +0000 (15:15 +0200)
Signed-off-by: Patrick McHardy <kaber@trash.net>
extensions/libipt_SET.c
extensions/libipt_set.c
extensions/libxt_CONNSECMARK.c
extensions/libxt_SECMARK.c
extensions/libxt_quota.c
ip6tables-restore.c
iptables-restore.c

index 378b77e425494c3922597f3e6b9abdd57333d0aa..62d959fe1695d34292cb01c93b3d80e22c73e56a 100644 (file)
@@ -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. */
index dcb74df99541a52ced5a7ed88ede8604f09880f1..759bca336c15d2c55790f48f55be4f17586d9592 100644 (file)
@@ -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. */
index 579ea4c3af9b3b47a28072b5458c5a55f03d549e..2c425cb8081387dd2af37742abba2833839ec88f 100644 (file)
@@ -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 }
 };
 
index feee0e4373e4e6dc595adf6b206bdac2444b790b..7d3dbfa27a59a72ea849a9684aa206d0a4618b6a 100644 (file)
@@ -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 }
 };
 
index a642aa4969b7e52145e6abc0ec490b742c1a7820..8e178fe7005e8ecffad27261ac46a496b6912182 100644 (file)
@@ -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,
index 9f6108a21ebf60e6ba5efd6f7d437074b6fee6b2..cd6dd032fed82ea2b21cd26a2ce2699ddefff114 100644 (file)
@@ -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";
index 879683c54921114a727ebdb0bb3caf830e3f18bd..4b199d94c1c728677fc537f834b4224da3c223a0 100644 (file)
@@ -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;