From 0d199bb941aac7052a19dd5d75520d016fff1765 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Tue, 29 Jan 2008 13:48:05 +0000 Subject: [PATCH]: fix gcc warnings Max Kellermann --- extensions/libxt_statistic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions/libxt_statistic.c') diff --git a/extensions/libxt_statistic.c b/extensions/libxt_statistic.c index 1b34527..19bb121 100644 --- a/extensions/libxt_statistic.c +++ b/extensions/libxt_statistic.c @@ -27,7 +27,7 @@ static const struct option statistic_opts[] = { { "probability", 1, NULL, '2' }, { "every", 1, NULL, '3' }, { "packet", 1, NULL, '4' }, - { } + { .name = NULL } }; static struct xt_statistic_info *info; @@ -113,7 +113,7 @@ static void statistic_check(unsigned int flags) exit_error(PARAMETER_PROBLEM, "--packet can only be used with --every"); /* at this point, info->u.nth.every have been decreased. */ - if (!(info->u.nth.packet >= 0 && info->u.nth.packet <= info->u.nth.every)) + if (info->u.nth.packet > info->u.nth.every) exit_error(PARAMETER_PROBLEM, "the --packet p must be 0 <= p <= n-1"); -- cgit v1.2.3