[netfilter-cvslog] r7445 - in trunk/iptables: . extensions

kaber at trash.net kaber at trash.net
Sun Apr 6 17:41:33 CEST 2008


Author: kaber at trash.net
Date: 2008-04-06 17:41:33 +0200 (Sun, 06 Apr 2008)
New Revision: 7445

Modified:
   trunk/iptables/configure.ac
   trunk/iptables/extensions/dscp_helper.c
   trunk/iptables/extensions/libip6t_dst.c
   trunk/iptables/extensions/libip6t_hbh.c
   trunk/iptables/extensions/libip6t_rt.c
   trunk/iptables/extensions/libipt_SAME.c
   trunk/iptables/extensions/libxt_TCPOPTSTRIP.c
   trunk/iptables/extensions/libxt_quota.c
   trunk/iptables/iptables-xml.c
   trunk/iptables/xtables.c
Log:
[PATCH 04/24] Drop -W from CFLAGS and some tiny code cleanups

- change "unsigned" to explicit "unsigned int"
- remove some casts


Modified: trunk/iptables/configure.ac
===================================================================
--- trunk/iptables/configure.ac	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/configure.ac	2008-04-06 15:41:33 UTC (rev 7445)
@@ -37,7 +37,7 @@
 AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" == "yes"])
 
 regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
-	-D_REENTRANT -W -Wall -Waggregate-return -Wmissing-declarations \
+	-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
 	-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
 	-Winline -pipe -DIPTABLES_VERSION=\\\"$PACKAGE_VERSION\\\" \
 	-DIPT_LIB_DIR=\\\"\${iptdir}\\\" -DIP6T_LIB_DIR=\\\"\${iptdir}\\\"";

Modified: trunk/iptables/extensions/dscp_helper.c
===================================================================
--- trunk/iptables/extensions/dscp_helper.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/extensions/dscp_helper.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -49,7 +49,7 @@
 static unsigned int
 class_to_dscp(const char *name)
 {
-	unsigned i;
+	unsigned int i;
 
 	for (i = 0; i < sizeof(ds_classes) / sizeof(struct ds_class); i++) {
 		if (!strncasecmp(name, ds_classes[i].name,

Modified: trunk/iptables/extensions/libip6t_dst.c
===================================================================
--- trunk/iptables/extensions/libip6t_dst.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/extensions/libip6t_dst.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -168,7 +168,7 @@
 }
 
 static void
-print_options(unsigned optsnr, u_int16_t *optsp)
+print_options(unsigned int optsnr, u_int16_t *optsp)
 {
 	unsigned int i;
 

Modified: trunk/iptables/extensions/libip6t_hbh.c
===================================================================
--- trunk/iptables/extensions/libip6t_hbh.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/extensions/libip6t_hbh.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -162,7 +162,7 @@
 }
 
 static void
-print_options(unsigned optsnr, u_int16_t *optsp)
+print_options(unsigned int optsnr, u_int16_t *optsp)
 {
 	unsigned int i;
 

Modified: trunk/iptables/extensions/libip6t_rt.c
===================================================================
--- trunk/iptables/extensions/libip6t_rt.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/extensions/libip6t_rt.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -255,7 +255,7 @@
 }
 
 static void
-print_addresses(unsigned addrnr, struct in6_addr *addrp)
+print_addresses(unsigned int addrnr, struct in6_addr *addrp)
 {
 	unsigned int i;
 

Modified: trunk/iptables/extensions/libipt_SAME.c
===================================================================
--- trunk/iptables/extensions/libipt_SAME.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/extensions/libipt_SAME.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -90,7 +90,7 @@
 {
 	struct ipt_same_info *mr
 		= (struct ipt_same_info *)(*target)->data;
-	unsigned count;
+	unsigned int count;
 
 	switch (c) {
 	case '1':
@@ -146,7 +146,7 @@
 static void SAME_print(const void *ip, const struct xt_entry_target *target,
                        int numeric)
 {
-	unsigned count;
+	unsigned int count;
 	struct ipt_same_info *mr
 		= (struct ipt_same_info *)target->data;
 	int random = 0;
@@ -180,7 +180,7 @@
 /* Saves the union ipt_targinfo in parsable form to stdout. */
 static void SAME_save(const void *ip, const struct xt_entry_target *target)
 {
-	unsigned count;
+	unsigned int count;
 	struct ipt_same_info *mr
 		= (struct ipt_same_info *)target->data;
 	int random = 0;

Modified: trunk/iptables/extensions/libxt_TCPOPTSTRIP.c
===================================================================
--- trunk/iptables/extensions/libxt_TCPOPTSTRIP.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/extensions/libxt_TCPOPTSTRIP.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -22,7 +22,7 @@
 
 struct tcp_optionmap {
 	const char *name, *desc;
-	const unsigned option;
+	const unsigned int option;
 };
 
 static const struct option tcpoptstrip_tg_opts[] = {

Modified: trunk/iptables/extensions/libxt_quota.c
===================================================================
--- trunk/iptables/extensions/libxt_quota.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/extensions/libxt_quota.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -43,7 +43,7 @@
 static int
 parse_quota(const char *s, u_int64_t * quota)
 {
-	*quota = strtoull(s, (char **) NULL, 10);
+	*quota = strtoull(s, NULL, 10);
 
 #ifdef DEBUG_XT_QUOTA
 	printf("Quota: %llu\n", *quota);

Modified: trunk/iptables/iptables-xml.c
===================================================================
--- trunk/iptables/iptables-xml.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/iptables-xml.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -85,10 +85,10 @@
 
 /* global new argv and argc */
 static char *newargv[255];
-static unsigned newargc = 0;
+static unsigned int newargc = 0;
 
 static char *oldargv[255];
-static unsigned oldargc = 0;
+static unsigned int oldargc = 0;
 
 /* arg meta data, were they quoted, frinstance */
 static int newargvattr[255];
@@ -129,7 +129,7 @@
 static void
 free_argv(void)
 {
-	unsigned i;
+	unsigned int i;
 
 	for (i = 0; i < newargc; i++) {
 		free(newargv[i]);
@@ -149,7 +149,7 @@
 static void
 save_argv(void)
 {
-	unsigned i;
+	unsigned int i;
 
 	for (i = 0; i < oldargc; i++)
 		free(oldargv[i]);
@@ -545,8 +545,8 @@
 	   is the case when processing the ACTUAL output of actual iptables-save 
 	   rather than a file merely in a compatable format */
 
-	unsigned old = 0;
-	unsigned new = 0;
+	unsigned int old = 0;
+	unsigned int new = 0;
 
 	int compare = 0;
 
@@ -748,7 +748,7 @@
 
 			ret = 1;
 		} else if (curTable[0]) {
-			unsigned a;
+			unsigned int a;
 			char *ptr = buffer;
 			char *pcnt = NULL;
 			char *bcnt = NULL;

Modified: trunk/iptables/xtables.c
===================================================================
--- trunk/iptables/xtables.c	2008-04-06 15:40:41 UTC (rev 7444)
+++ trunk/iptables/xtables.c	2008-04-06 15:41:33 UTC (rev 7445)
@@ -257,7 +257,7 @@
 
 u_int16_t parse_port(const char *port, const char *proto)
 {
-	unsigned portnum;
+	unsigned int portnum;
 
 	if ((string_to_number(port, 0, 65535, &portnum)) != -1 ||
 	    (portnum = service_to_port(port, proto)) != (unsigned)-1)




More information about the netfilter-cvslog mailing list