Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Dec 2006 17:48:02 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 112292 for review
Message-ID:  <200612291748.kBTHm22G089964@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112292

Change 112292 by piso@piso_newluxor on 2006/12/29 17:47:08

	o spacing.
	o s/u_int/uint/g.
	o anticipate a couple of mtx_unlock().

Affected files ...

.. //depot/projects/soc2005/libalias/sbin/ipfw/ipfw2.c#15 edit
.. //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#34 edit

Differences ...

==== //depot/projects/soc2005/libalias/sbin/ipfw/ipfw2.c#15 (text+ko) ====

@@ -5860,7 +5860,7 @@
 	struct cfg_redir *e;
 	int cmd, i, nbytes, do_cfg, do_rule, frule, lrule, nalloc, size;
 	int nat_cnt, r;
-	u_int8_t *data, *p;
+	uint8_t *data, *p;
 	char **lav, *endptr;
 
 	do_rule = 0;

==== //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#34 (text+ko) ====

@@ -4580,17 +4580,17 @@
 			/* New rule: allocate and init new instance. */
 			ptr = malloc(sizeof(struct cfg_nat), 
 		            M_IPFW, M_NOWAIT | M_ZERO);
-			if (ptr == NULL) {		
+			if (ptr == NULL) {
+				IPFW_WUNLOCK(&layer3_chain);				
 				free(buf, M_IPFW);
-				IPFW_WUNLOCK(&layer3_chain);				
 				return (ENOSPC);				
 			}
 			ptr->lib = LibAliasInit(NULL);
-			if (ptr->lib == NULL) {		
+			if (ptr->lib == NULL) {
+				IPFW_WUNLOCK(&layer3_chain);
 				free(ptr, M_IPFW);
-				free(buf, M_IPFW);
-				IPFW_WUNLOCK(&layer3_chain);	
-				return(EINVAL);
+				free(buf, M_IPFW);		
+				return (EINVAL);
 			}
 			LIST_INIT(&ptr->redir_chain);
 		} else {
@@ -4654,7 +4654,7 @@
 
 	case IP_FW_NAT_GET_CONFIG:
 	{
-		u_int8_t *data;
+		uint8_t *data;
 		struct cfg_nat *n;
 		struct cfg_redir *r;
 		struct cfg_spool *s;
@@ -4713,7 +4713,7 @@
 
 	case IP_FW_NAT_GET_LOG:
 	{
-		u_int8_t *data;
+		uint8_t *data;
 		struct cfg_nat *ptr;
 		int i, size, cnt, sof;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612291748.kBTHm22G089964>