[iptables PATCH trunk7285 3/7] use size_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---

 extensions/libxt_NFLOG.c |    9 +++++----
 iptables-restore.c       |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)


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 @@ static int NFLOG_parse(int c, char **argv, int invert, unsigned int *flags,
 {
 	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 @@ static int NFLOG_parse(int c, char **argv, int invert, unsigned int *flags,
 			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 f328bd8..30746ff 100644
--- a/iptables-restore.c
+++ b/iptables-restore.c
@@ -320,7 +320,7 @@ main(int argc, char *argv[])
 			/* the parser */
 			char *curchar;
 			int quote_open;
-			int param_len;
+			size_t param_len;
 
 			/* reset the newargv */
 			newargc = 0;


-
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux