summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_serv.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-22 01:21:33 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-22 01:21:33 +0000
commitd14a3197eff39aeb2d1cf2c146a4a56ae0087f59 (patch)
treeed69bb0084ef27e22400dc53af6689af7b611ce8 /sys/nfs/nfs_serv.c
parent130d7054b7563efd588db703e814bffc6f7aae48 (diff)
Changes made for GCC 2.8 -Wall pleasures
Diffstat (limited to 'sys/nfs/nfs_serv.c')
-rw-r--r--sys/nfs/nfs_serv.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index e4ecb5b3fac..31beaa583cd 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.14 1997/11/06 05:59:02 csapuntz Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.15 1998/02/22 01:21:31 niklas Exp $ */
/* $NetBSD: nfs_serv.c,v 1.25 1996/03/02 15:55:52 jtk Exp $ */
/*
@@ -1777,45 +1777,27 @@ nfsrv_rename(nfsd, slp, procp, mrq)
tvp = tond.ni_vp;
if (tvp != NULL) {
if (fvp->v_type == VDIR && tvp->v_type != VDIR) {
- if (v3)
- error = EEXIST;
- else
- error = EISDIR;
+ error = v3 ? EEXIST : EISDIR;
goto out;
} else if (fvp->v_type != VDIR && tvp->v_type == VDIR) {
- if (v3)
- error = EEXIST;
- else
- error = ENOTDIR;
+ error = v3 ? EEXIST : ENOTDIR;
goto out;
}
if (tvp->v_type == VDIR && tvp->v_mountedhere) {
- if (v3)
- error = EXDEV;
- else
- error = ENOTEMPTY;
+ error = v3 ? EXDEV : ENOTEMPTY;
goto out;
}
}
if (fvp->v_type == VDIR && fvp->v_mountedhere) {
- if (v3)
- error = EXDEV;
- else
- error = ENOTEMPTY;
+ error = v3 ? EXDEV : ENOTEMPTY;
goto out;
}
if (fvp->v_mount != tdvp->v_mount) {
- if (v3)
- error = EXDEV;
- else
- error = ENOTEMPTY;
+ error = v3 ? EXDEV : ENOTEMPTY;
goto out;
}
if (fvp == tdvp)
- if (v3)
- error = EINVAL;
- else
- error = ENOTEMPTY;
+ error = v3 ? EINVAL : ENOTEMPTY;
/*
* If source is the same as the destination (that is the
* same vnode with the same name in the same directory),