summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat/fstat.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-06 18:49:36 +0000
committered <ed@FreeBSD.org>2011-11-06 18:49:36 +0000
commitb9deaeaf5165db1590f1d5bed3cbaffdcc221ba3 (patch)
tree1b85a84ffb883b69d196d38be9a560e21b2335a8 /usr.bin/fstat/fstat.c
parentb4971e80feba1fb8436b486961807d2a855b2f52 (diff)
downloadFreeBSD-src-b9deaeaf5165db1590f1d5bed3cbaffdcc221ba3.zip
FreeBSD-src-b9deaeaf5165db1590f1d5bed3cbaffdcc221ba3.tar.gz
Mark global functions and/or variables in fstat(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
Diffstat (limited to 'usr.bin/fstat/fstat.c')
-rw-r--r--usr.bin/fstat/fstat.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index ed85351..159ceb9 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -57,13 +57,13 @@ __FBSDID("$FreeBSD$");
#include "functions.h"
-int fsflg, /* show files on same filesystem as file(s) argument */
- pflg, /* show files open by a particular pid */
- uflg; /* show files open by a particular (effective) user */
-int checkfile; /* true if restricting to particular files or filesystems */
-int nflg; /* (numerical) display f.s. and rdev as dev_t */
-int mflg; /* include memory-mapped files */
-int vflg; /* be verbose */
+static int fsflg, /* show files on same filesystem as file(s) argument */
+ pflg, /* show files open by a particular pid */
+ uflg; /* show files open by a particular (effective) user */
+static int checkfile; /* restrict to particular files or filesystems */
+static int nflg; /* (numerical) display f.s. and rdev as dev_t */
+static int mflg; /* include memory-mapped files */
+static int vflg; /* be verbose */
typedef struct devs {
struct devs *next;
@@ -72,8 +72,8 @@ typedef struct devs {
const char *name;
} DEVS;
-DEVS *devs;
-char *memf, *nlistf;
+static DEVS *devs;
+static char *memf, *nlistf;
static int getfname(const char *filename);
static void dofiles(struct procstat *procstat, struct kinfo_proc *p);
OpenPOWER on IntegriCloud