Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern vfs_sysctl(): cosmetic: provide explicit size for v...



details:   https://anonhg.NetBSD.org/src/rev/055c895d10d6
branches:  trunk
changeset: 512234:055c895d10d6
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Jul 08 10:32:38 2001 +0000

description:
vfs_sysctl(): cosmetic: provide explicit size for vfsnames[], to catch
        mistakes VFS_MAXID/CTL_VFS_NAMES are updated

diffstat:

 sys/kern/vfs_subr.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r acb412d3aa59 -r 055c895d10d6 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Sun Jul 08 08:17:57 2001 +0000
+++ b/sys/kern/vfs_subr.c       Sun Jul 08 10:32:38 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.154 2001/06/28 08:12:08 jdolecek Exp $  */
+/*     $NetBSD: vfs_subr.c,v 1.155 2001/07/08 10:32:38 jdolecek Exp $  */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -1908,7 +1908,7 @@
 
        /* Not generic: goes to file system. */
        if (name[0] != VFS_GENERIC) {
-               static const struct ctlname vfsnames[] = CTL_VFS_NAMES;
+               static const struct ctlname vfsnames[VFS_MAXID+1]=CTL_VFS_NAMES;
                const char *vfsname;
 
                if (name[0] < 0 || name[0] > VFS_MAXID



Home | Main Index | Thread Index | Old Index