summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-08 23:20:15 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-08 23:20:15 +0000
commit4f55d0d1d06df4d203fe33779d7363dc28f61dd0 (patch)
treef7f1c7984e6d65160859aa3f9c9a6baaeaa422e9 /sys
parent4366c1d68dac8a0a2ac860c06ba33e18e860eded (diff)
Rearrange condition so invalid dereferences can't happen
Diffstat (limited to 'sys')
-rw-r--r--sys/nfs/nfs_serv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index f4ac14a698a..82ccc51401d 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.6 1996/04/21 22:30:23 deraadt Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.7 1996/11/08 23:20:14 niklas Exp $ */
/* $NetBSD: nfs_serv.c,v 1.25 1996/03/02 15:55:52 jtk Exp $ */
/*
@@ -2539,8 +2539,8 @@ again:
dp = (struct dirent *)cpos;
cookiep = cookies;
- while ((dp->d_fileno == 0 || dp->d_type == DT_WHT) &&
- cpos < cend && ncookies > 0) {
+ while (cpos < cend && ncookies > 0 &&
+ (dp->d_fileno == 0 || dp->d_type == DT_WHT)) {
cpos += dp->d_reclen;
dp = (struct dirent *)cpos;
cookiep++;