summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_statistic.c
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net>2008-01-29 13:48:05 +0000
committer/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net>2008-01-29 13:48:05 +0000
commit0d199bb941aac7052a19dd5d75520d016fff1765 (patch)
tree13f39ec579024d42beb0ce6509b0c935dbe8ca03 /extensions/libxt_statistic.c
parent4e7cb355f8e82e7d4d7c6bf6dd36a6d860a3e70f (diff)
[PATCH]: fix gcc warnings
Max Kellermann <max@duempel.org>
Diffstat (limited to 'extensions/libxt_statistic.c')
-rw-r--r--extensions/libxt_statistic.c4
1 files changed, 2 insertions, 2 deletions
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");