summaryrefslogtreecommitdiffstats
path: root/sys/fs/fdescfs
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-09-09 13:23:20 +0000
committerdg <dg@FreeBSD.org>1994-09-09 13:23:20 +0000
commitd3296d0014d0f25ae8b9b9c93f9849de9094e5cc (patch)
tree2198b333c02a5f3b417652c7e0a01ad7f3f2b6ec /sys/fs/fdescfs
parent3e7f1f5c5049c10d00e14a0718383647f5756be6 (diff)
downloadFreeBSD-src-d3296d0014d0f25ae8b9b9c93f9849de9094e5cc.zip
FreeBSD-src-d3296d0014d0f25ae8b9b9c93f9849de9094e5cc.tar.gz
Fixed off by one error in referencing an array.
Stolen from: NetBSD
Diffstat (limited to 'sys/fs/fdescfs')
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 83e6657..517e349 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
- * $Id: fdesc_vnops.c,v 1.12 1993/04/06 16:17:17 jsp Exp $
+ * $Id: fdesc_vnops.c,v 1.2 1994/05/25 09:07:13 rgrimes Exp $
*/
/*
@@ -72,8 +72,8 @@ dev_t devctty;
FD_STDIN, FD_STDOUT, FD_STDERR must be a sequence n, n+1, n+2
#endif
-#define NFDCACHE 3
-#define FD_NHASH(ix) ((ix) & NFDCACHE)
+#define NFDCACHE 4
+#define FD_NHASH(ix) ((ix) & NFDCACHE-1)
/*
* Cache head
OpenPOWER on IntegriCloud