]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: remove bogus use of XT_GETOPT_TABLEEND
authorJan Engelhardt <jengelh@medozas.de>
Sat, 7 May 2011 02:01:25 +0000 (04:01 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 8 May 2011 13:12:59 +0000 (15:12 +0200)
Commit v1.4.8-36-g32b8e61 added this end marker in a little too many
places: at non-getopt places. Fix that.

Also change the definition of XT_GETOPT_TABLEEND to reference a struct
getopt member by name so that this cannot happen again.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libxt_TCPOPTSTRIP.c
extensions/libxt_rateest.c
include/xtables.h.in

index 43320d1b38da56944693d31e41cb45cf36d6409a..6897857317b6cbe2473fa336b25a0caf297c69dc 100644 (file)
@@ -34,7 +34,7 @@ static const struct tcp_optionmap tcp_optionmap[] = {
        {"sack",           "Selective ACK",        TCPOPT_SACK},
        {"timestamp",      "Timestamp",            TCPOPT_TIMESTAMP},
        {"md5",            "MD5 signature",        TCPOPT_MD5SIG},
-       XT_GETOPT_TABLEEND,
+       {NULL},
 };
 
 static void tcpoptstrip_tg_help(void)
index 6998c016eef3504c9676cd7d0781819ebee86dbe..e70edc6734e3b32e8565b09c9642766577f24791 100644 (file)
@@ -80,7 +80,7 @@ static const struct rate_suffix {
        { "GBps",       8000000000. },
        { "TiBps",      8.*1024.*1024.*1024.*1024. },
        { "TBps",       8000000000000. },
-       XT_GETOPT_TABLEEND,
+       {NULL},
 };
 
 static int
index 0cd9f9f8bf4dcdbc8a008992af51c3b0c43dae80..da8d84c9950ca26e67522e81fa23733e69be71bc 100644 (file)
@@ -346,7 +346,7 @@ struct xtables_globals
        void (*exit_err)(enum xtables_exittype status, const char *msg, ...) __attribute__((noreturn, format(printf,2,3)));
 };
 
-#define XT_GETOPT_TABLEEND {NULL}
+#define XT_GETOPT_TABLEEND {.name = NULL, .has_arg = false}
 
 #ifdef __cplusplus
 extern "C" {