svn commit: r205917 - stable/7/sys/nfs

Marius Strobl marius at FreeBSD.org
Tue Mar 30 19:52:46 UTC 2010


Author: marius
Date: Tue Mar 30 19:52:45 2010
New Revision: 205917
URL: http://svn.freebsd.org/changeset/base/205917

Log:
  MFC: r203731
  
  Some style(9) fixes

Modified:
  stable/7/sys/nfs/nfs_common.c
  stable/7/sys/nfs/nfs_common.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/nfs/nfs_common.c
==============================================================================
--- stable/7/sys/nfs/nfs_common.c	Tue Mar 30 19:41:43 2010	(r205916)
+++ stable/7/sys/nfs/nfs_common.c	Tue Mar 30 19:52:45 2010	(r205917)
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 
 /*
  * These functions support the macros and help fiddle mbuf chains for
- * the nfs op functions. They do things like create the rpc header and
+ * the nfs op functions.  They do things like create the rpc header and
  * copy data between mbuf chains and uio lists.
  */
 
@@ -76,10 +76,11 @@ nfstype nfsv3_type[9] = {
 	NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK, NFFIFO, NFNON
 };
 
-static void *nfsm_dissect_xx_sub(int s, struct mbuf **md, caddr_t *dpos, int how);
+static void *nfsm_dissect_xx_sub(int s, struct mbuf **md, caddr_t *dpos,
+    int how);
 
 u_quad_t
-nfs_curusec(void) 
+nfs_curusec(void)
 {
 	struct timeval tv;
 
@@ -177,7 +178,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d
 	while (left == 0) {
 		*mdp = mp = mp->m_next;
 		if (mp == NULL)
-			return NULL;
+			return (NULL);
 		left = mp->m_len;
 		*dposp = mtod(mp, caddr_t);
 	}
@@ -185,13 +186,13 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d
 		ret = *dposp;
 		*dposp += siz;
 	} else if (mp->m_next == NULL) {
-		return NULL;
+		return (NULL);
 	} else if (siz > MHLEN) {
 		panic("nfs S too big");
 	} else {
 		MGET(mp2, how, MT_DATA);
 		if (mp2 == NULL)
-			return NULL;
+			return (NULL);
 		mp2->m_len = siz;
 		mp2->m_next = mp->m_next;
 		mp->m_next = mp2;
@@ -207,7 +208,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d
 		/* Loop around copying up the siz2 bytes */
 		while (siz2 > 0) {
 			if (mp2 == NULL)
-				return NULL;
+				return (NULL);
 			xfer = (siz2 > mp2->m_len) ? mp2->m_len : siz2;
 			if (xfer > 0) {
 				bcopy(mtod(mp2, caddr_t), ptr, xfer);
@@ -230,7 +231,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d
 			*dposp = npos;
 		}
 	}
-	return ret;
+	return (ret);
 }
 
 /*
@@ -274,19 +275,21 @@ nfsm_build_xx(int s, struct mbuf **mb, c
 	ret = *bpos;
 	(*mb)->m_len += s;
 	*bpos += s;
-	return ret;
+	return (ret);
 }
 
 void *
 nfsm_dissect_xx(int s, struct mbuf **md, caddr_t *dpos)
 {
-	return nfsm_dissect_xx_sub(s, md, dpos, M_TRYWAIT);
+
+	return (nfsm_dissect_xx_sub(s, md, dpos, M_TRYWAIT));
 }
 
 void *
 nfsm_dissect_xx_nonblock(int s, struct mbuf **md, caddr_t *dpos)
 {
-	return nfsm_dissect_xx_sub(s, md, dpos, M_DONTWAIT);
+
+	return (nfsm_dissect_xx_sub(s, md, dpos, M_DONTWAIT));
 }
 
 static void *
@@ -300,10 +303,10 @@ nfsm_dissect_xx_sub(int s, struct mbuf *
 	if (t1 >= s) {
 		ret = *dpos;
 		*dpos += s;
-		return ret;
+		return (ret);
 	}
-	cp2 = nfsm_disct(md, dpos, s, t1, how); 
-	return cp2;
+	cp2 = nfsm_disct(md, dpos, s, t1, how);
+	return (cp2);
 }
 
 int
@@ -313,11 +316,11 @@ nfsm_strsiz_xx(int *s, int m, struct mbu
 
 	tl = nfsm_dissect_xx(NFSX_UNSIGNED, mb, bpos);
 	if (tl == NULL)
-		return EBADRPC;
+		return (EBADRPC);
 	*s = fxdr_unsigned(int32_t, *tl);
 	if (*s > m)
-		return EBADRPC;
-	return 0;
+		return (EBADRPC);
+	return (0);
 }
 
 int
@@ -328,10 +331,10 @@ nfsm_adv_xx(int s, struct mbuf **md, cad
 	t1 = mtod(*md, caddr_t) + (*md)->m_len - *dpos;
 	if (t1 >= s) {
 		*dpos += s;
-		return 0;
+		return (0);
 	}
 	t1 = nfs_adv(md, dpos, s, t1);
 	if (t1)
-		return t1;
-	return 0;
+		return (t1);
+	return (0);
 }

Modified: stable/7/sys/nfs/nfs_common.h
==============================================================================
--- stable/7/sys/nfs/nfs_common.h	Tue Mar 30 19:41:43 2010	(r205916)
+++ stable/7/sys/nfs/nfs_common.h	Tue Mar 30 19:52:45 2010	(r205917)
@@ -33,7 +33,6 @@
  * $FreeBSD$
  */
 
-
 #ifndef _NFS_NFS_COMMON_H_
 #define _NFS_NFS_COMMON_H_
 
@@ -86,7 +85,7 @@ do { \
 		goto nfsmout; \
 	} \
 } while (0)
-		
+
 #define	nfsm_dissect(c, s) \
 ({ \
 	void *ret; \


More information about the svn-src-stable-7 mailing list