use size_t
Max Kellermann <max@duempel.org>
diff --git a/extensions/libxt_NFLOG.c b/extensions/libxt_NFLOG.c
index a948237..e96878c 100644
--- a/extensions/libxt_NFLOG.c
+++ b/extensions/libxt_NFLOG.c
@@ -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);
diff --git a/iptables-restore.c b/iptables-restore.c
index dc82f1d..ade1a2f 100644
--- a/iptables-restore.c
+++ b/iptables-restore.c
@@ -320,7 +320,7 @@
/* the parser */
char *curchar;
int quote_open;
- int param_len;
+ size_t param_len;
/* reset the newargv */
newargc = 0;