[netfilter-cvslog] r7302 - in trunk/iptables: . extensions
kaber at trash.net
kaber at trash.net
Tue Jan 29 14:43:35 CET 2008
Author: kaber at trash.net
Date: 2008-01-29 14:43:35 +0100 (Tue, 29 Jan 2008)
New Revision: 7302
Modified:
trunk/iptables/extensions/libxt_NFLOG.c
trunk/iptables/iptables-restore.c
Log:
[PATCH]: use size_t
Max Kellermann <max at duempel.org>
Modified: trunk/iptables/extensions/libxt_NFLOG.c
===================================================================
--- trunk/iptables/extensions/libxt_NFLOG.c 2008-01-29 13:42:48 UTC (rev 7301)
+++ trunk/iptables/extensions/libxt_NFLOG.c 2008-01-29 13:43:35 UTC (rev 7302)
@@ -45,6 +45,7 @@
{
struct xt_nflog_info *info = (struct xt_nflog_info *)(*target)->data;
int n;
+ size_t length;
switch (c) {
case NFLOG_GROUP:
@@ -69,15 +70,15 @@
exit_error(PARAMETER_PROBLEM,
"Unexpected `!' after --nflog-prefix");
- n = strlen(optarg);
- if (n == 0)
+ length = strlen(optarg);
+ if (length == 0)
exit_error(PARAMETER_PROBLEM,
"No prefix specified for --nflog-prefix");
- if (n >= sizeof(info->prefix))
+ if (length >= sizeof(info->prefix))
exit_error(PARAMETER_PROBLEM,
"--nflog-prefix too long, max %Zu characters",
sizeof(info->prefix) - 1);
- if (n != strlen(strtok(optarg, "\n")))
+ if (length != strlen(strtok(optarg, "\n")))
exit_error(PARAMETER_PROBLEM,
"Newlines are not allowed in --nflog-prefix");
strcpy(info->prefix, optarg);
Modified: trunk/iptables/iptables-restore.c
===================================================================
--- trunk/iptables/iptables-restore.c 2008-01-29 13:42:48 UTC (rev 7301)
+++ trunk/iptables/iptables-restore.c 2008-01-29 13:43:35 UTC (rev 7302)
@@ -320,7 +320,7 @@
/* the parser */
char *curchar;
int quote_open;
- int param_len;
+ size_t param_len;
/* reset the newargv */
newargc = 0;
More information about the netfilter-cvslog
mailing list