Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/procfs make some local arrays/variables static + ...
details: https://anonhg.NetBSD.org/src/rev/73ee0a12c6da
branches: trunk
changeset: 545904:73ee0a12c6da
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Thu Apr 17 18:08:28 2003 +0000
description:
make some local arrays/variables static + const
diffstat:
sys/miscfs/procfs/procfs_vnops.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (56 lines):
diff -r d9875dc7c0a7 -r 73ee0a12c6da sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c Thu Apr 17 18:04:47 2003 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c Thu Apr 17 18:08:28 2003 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
#include <sys/systm.h>
@@ -81,10 +81,10 @@
* 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 @@
#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 @@
{ 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 *));
Home |
Main Index |
Thread Index |
Old Index