From 64b598bf3316585312c43df2a7ce4379324c6ba2 Mon Sep 17 00:00:00 2001 From: jdolecek Date: Thu, 17 Apr 2003 18:08:28 +0000 Subject: [PATCH] make some local arrays/variables static + const --- sys/miscfs/procfs/procfs_vnops.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 35fe733a57b4..3bcbada51052 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_vnops.c,v 1.96 2003/04/10 21:53:34 jdolecek Exp $ */ +/* $NetBSD: procfs_vnops.c,v 1.97 2003/04/17 18:08:28 jdolecek Exp $ */ /* * Copyright (c) 1993 Jan-Simon Pendry @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.96 2003/04/10 21:53:34 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.97 2003/04/17 18:08:28 jdolecek Exp $"); #include #include @@ -81,10 +81,10 @@ static int procfs_validfile_linux __P((struct proc *, struct mount *)); * process-specific sub-directories. It is * used in procfs_lookup and procfs_readdir */ -const struct proc_target { +static const struct proc_target { u_char pt_type; u_char pt_namlen; - char *pt_name; + const char *pt_name; pfstype pt_pfstype; int (*pt_valid) __P((struct proc *, struct mount *)); } proc_targets[] = { @@ -110,13 +110,13 @@ const struct proc_target { #endif #undef N }; -static int nproc_targets = sizeof(proc_targets) / sizeof(proc_targets[0]); +static const int nproc_targets = sizeof(proc_targets) / sizeof(proc_targets[0]); /* * List of files in the root directory. Note: the validate function will * be called with p == NULL for these ones. */ -struct proc_target proc_root_targets[] = { +static const struct proc_target proc_root_targets[] = { #define N(s) sizeof(s)-1, s /* name type validp */ { DT_REG, N("meminfo"), Pmeminfo, procfs_validfile_linux }, @@ -124,7 +124,7 @@ struct proc_target proc_root_targets[] = { { DT_REG, N("uptime"), Puptime, procfs_validfile_linux }, #undef N }; -static int nproc_root_targets = +static const int nproc_root_targets = sizeof(proc_root_targets) / sizeof(proc_root_targets[0]); int procfs_lookup __P((void *));