summaryrefslogtreecommitdiffstats
path: root/sbin/mount_nfs
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2006-03-20 21:28:46 +0000
committerimp <imp@FreeBSD.org>2006-03-20 21:28:46 +0000
commit13ad9e48d194aaa9df0f09c14a965cb6583b92d5 (patch)
treed56367907119731c5fbb2750af424466b0dddb8a /sbin/mount_nfs
parentff76f17f4488f33da05afb911b8d76fcf02b8bca (diff)
downloadFreeBSD-src-13ad9e48d194aaa9df0f09c14a965cb6583b92d5.zip
FreeBSD-src-13ad9e48d194aaa9df0f09c14a965cb6583b92d5.tar.gz
Minor style(9) and KNF elimination as I prepare to fix a bug.
Diffstat (limited to 'sbin/mount_nfs')
-rw-r--r--sbin/mount_nfs/mount_nfs.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index a2e0586..7607f65 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -244,9 +244,7 @@ set_flags(int* altflags, int* nfsflags, int dir)
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int c;
struct nfs_args *nfsargsp;
@@ -463,9 +461,7 @@ main(argc, argv)
}
int
-getnfsargs(spec, nfsargsp)
- char *spec;
- struct nfs_args *nfsargsp;
+getnfsargs(char *spec, struct nfs_args *nfsargsp)
{
struct addrinfo hints, *ai_nfs, *ai;
enum tryret ret;
@@ -819,7 +815,8 @@ returncode(enum clnt_stat stat, struct rpc_err *rpcerr)
* XXX there should be a library function for this.
*/
char *
-netidbytype(int af, int sotype) {
+netidbytype(int af, int sotype)
+{
struct nc_protos *p;
for (p = nc_protos; p->netid != NULL; p++) {
@@ -838,7 +835,8 @@ netidbytype(int af, int sotype) {
* work on failure.
*/
struct netconfig *
-getnetconf_cached(const char *netid) {
+getnetconf_cached(const char *netid)
+{
static struct nc_entry {
struct netconfig *nconf;
struct nc_entry *next;
@@ -865,17 +863,13 @@ getnetconf_cached(const char *netid) {
* xdr routines for mount rpc's
*/
int
-xdr_dir(xdrsp, dirp)
- XDR *xdrsp;
- char *dirp;
+xdr_dir(XDR *xdrsp, char *dirp)
{
return (xdr_string(xdrsp, &dirp, RPCMNT_PATHLEN));
}
int
-xdr_fh(xdrsp, np)
- XDR *xdrsp;
- struct nfhret *np;
+xdr_fh(XDR *xdrsp, struct nfhret *np)
{
int i;
long auth, authcnt, authfnd = 0;
OpenPOWER on IntegriCloud