diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2002-08-03 08:29:33 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2002-08-03 08:29:33 +0000 |
commit | 9a50ceafc10893c30ce6a3fa35b0aa0ace4f45a2 (patch) | |
tree | d511173eb6b0050f548c64e8438b6fa58294ad90 /usr.sbin/amd/rpcx/mount_xdr.c | |
parent | 2424909aa4f4005db0867528ed4ee0ebc3c31bd7 (diff) |
various KNF and code cleanup/simplification, parts checked by millert/deraadt
Diffstat (limited to 'usr.sbin/amd/rpcx/mount_xdr.c')
-rw-r--r-- | usr.sbin/amd/rpcx/mount_xdr.c | 74 |
1 files changed, 13 insertions, 61 deletions
diff --git a/usr.sbin/amd/rpcx/mount_xdr.c b/usr.sbin/amd/rpcx/mount_xdr.c index 1ad64c69916..32cc9b629bb 100644 --- a/usr.sbin/amd/rpcx/mount_xdr.c +++ b/usr.sbin/amd/rpcx/mount_xdr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_xdr.c,v 1.2 1996/03/25 15:54:57 niklas Exp $ */ +/* $OpenBSD: mount_xdr.c,v 1.3 2002/08/03 08:29:32 pvalchev Exp $ */ /* * Copyright (c) 1989 Jan-Simon Pendry @@ -46,9 +46,7 @@ #if NFS_PROTOCOL_VERSION < 3 bool_t -xdr_fhandle(xdrs, objp) - XDR *xdrs; - fhandle objp; +xdr_fhandle(XDR *xdrs, fhandle objp) { if (!xdr_opaque(xdrs, objp, FHSIZE)) { return (FALSE); @@ -57,9 +55,7 @@ xdr_fhandle(xdrs, objp) } bool_t -xdr_fhstatus(xdrs, objp) - XDR *xdrs; - fhstatus *objp; +xdr_fhstatus(XDR *xdrs, fhstatus *objp) { if (!xdr_u_int(xdrs, &objp->fhs_stat)) { return (FALSE); @@ -78,11 +74,9 @@ xdr_fhstatus(xdrs, objp) #include <nfs/rpcv2.h> int -xdr_fhstatus(xdrsp, objp) - XDR *xdrsp; - fhstatus *objp; +xdr_fhstatus(XDR *xdrsp, fhstatus *objp) { - register int i; + int i; long auth, authcnt, authfnd = 0; @@ -122,14 +116,8 @@ xdr_fhstatus(xdrsp, objp) } #endif - - - - bool_t -xdr_dirpath(xdrs, objp) - XDR *xdrs; - dirpath *objp; +xdr_dirpath(XDR *xdrs, dirpath *objp) { if (!xdr_string(xdrs, objp, MNTPATHLEN)) { return (FALSE); @@ -137,13 +125,8 @@ xdr_dirpath(xdrs, objp) return (TRUE); } - - - bool_t -xdr_name(xdrs, objp) - XDR *xdrs; - name *objp; +xdr_name(XDR *xdrs, name *objp) { if (!xdr_string(xdrs, objp, MNTNAMLEN)) { return (FALSE); @@ -151,13 +134,8 @@ xdr_name(xdrs, objp) return (TRUE); } - - - bool_t -xdr_mountlist(xdrs, objp) - XDR *xdrs; - mountlist *objp; +xdr_mountlist(XDR *xdrs, mountlist *objp) { if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct mountbody), xdr_mountbody)) { return (FALSE); @@ -165,12 +143,8 @@ xdr_mountlist(xdrs, objp) return (TRUE); } - - bool_t -xdr_mountbody(xdrs, objp) - XDR *xdrs; - mountbody *objp; +xdr_mountbody(XDR *xdrs, mountbody *objp) { if (!xdr_name(xdrs, &objp->ml_hostname)) { return (FALSE); @@ -184,13 +158,8 @@ xdr_mountbody(xdrs, objp) return (TRUE); } - - - bool_t -xdr_groups(xdrs, objp) - XDR *xdrs; - groups *objp; +xdr_groups(XDR *xdrs, groups *objp) { if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct groupnode), xdr_groupnode)) { return (FALSE); @@ -198,13 +167,8 @@ xdr_groups(xdrs, objp) return (TRUE); } - - - bool_t -xdr_groupnode(xdrs, objp) - XDR *xdrs; - groupnode *objp; +xdr_groupnode(XDR *xdrs, groupnode *objp) { if (!xdr_name(xdrs, &objp->gr_name)) { return (FALSE); @@ -215,13 +179,8 @@ xdr_groupnode(xdrs, objp) return (TRUE); } - - - bool_t -xdr_exports(xdrs, objp) - XDR *xdrs; - exports *objp; +xdr_exports(XDR *xdrs, exports *objp) { if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct exportnode), xdr_exportnode)) { return (FALSE); @@ -229,13 +188,8 @@ xdr_exports(xdrs, objp) return (TRUE); } - - - bool_t -xdr_exportnode(xdrs, objp) - XDR *xdrs; - exportnode *objp; +xdr_exportnode(XDR *xdrs, exportnode *objp) { if (!xdr_dirpath(xdrs, &objp->ex_dir)) { return (FALSE); @@ -248,5 +202,3 @@ xdr_exportnode(xdrs, objp) } return (TRUE); } - - |