summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-02-09 23:40:07 +0000
committermarius <marius@FreeBSD.org>2010-02-09 23:40:07 +0000
commit8c1dfdc492d1c6bd09a599013e66bb05a06a1d5c (patch)
tree39817c67e9a89042761d4ba212a375b4bdc47929 /sys/nfs
parent7b5cc4e51b57df31f63a8d802fe6c25ad3461194 (diff)
downloadFreeBSD-src-8c1dfdc492d1c6bd09a599013e66bb05a06a1d5c.zip
FreeBSD-src-8c1dfdc492d1c6bd09a599013e66bb05a06a1d5c.tar.gz
Some style(9) fixes
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_common.c43
-rw-r--r--sys/nfs/nfs_common.h3
2 files changed, 24 insertions, 22 deletions
diff --git a/sys/nfs/nfs_common.c b/sys/nfs/nfs_common.c
index b2c231f..6f42645 100644
--- a/sys/nfs/nfs_common.c
+++ b/sys/nfs/nfs_common.c
@@ -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.
*/
@@ -75,10 +75,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;
@@ -176,7 +177,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *dposp, int siz, int left, int how)
while (left == 0) {
*mdp = mp = mp->m_next;
if (mp == NULL)
- return NULL;
+ return (NULL);
left = mp->m_len;
*dposp = mtod(mp, caddr_t);
}
@@ -184,13 +185,13 @@ nfsm_disct(struct mbuf **mdp, caddr_t *dposp, int siz, int left, int how)
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;
@@ -206,7 +207,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *dposp, int siz, int left, int how)
/* 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);
@@ -229,7 +230,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *dposp, int siz, int left, int how)
*dposp = npos;
}
}
- return ret;
+ return (ret);
}
/*
@@ -273,19 +274,21 @@ nfsm_build_xx(int s, struct mbuf **mb, caddr_t *bpos)
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_WAIT);
+
+ return (nfsm_dissect_xx_sub(s, md, dpos, M_WAIT));
}
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 *
@@ -299,10 +302,10 @@ nfsm_dissect_xx_sub(int s, struct mbuf **md, caddr_t *dpos, int how)
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
@@ -312,11 +315,11 @@ nfsm_strsiz_xx(int *s, int m, struct mbuf **mb, caddr_t *bpos)
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
@@ -327,10 +330,10 @@ nfsm_adv_xx(int s, struct mbuf **md, caddr_t *dpos)
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);
}
diff --git a/sys/nfs/nfs_common.h b/sys/nfs/nfs_common.h
index 7c06130..9ad1c11 100644
--- a/sys/nfs/nfs_common.h
+++ b/sys/nfs/nfs_common.h
@@ -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; \
OpenPOWER on IntegriCloud