diff options
author | ed <ed@FreeBSD.org> | 2011-11-06 19:01:59 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-11-06 19:01:59 +0000 |
commit | 5e4b02fe9780f4d6ea81376bcad46e2cf70b5eb3 (patch) | |
tree | 36a97b968aa9c08097f90a19905b1fdb2203df36 /usr.sbin/memcontrol | |
parent | 32375b4cab09ed500243e98e3f5620b9b9017714 (diff) | |
download | FreeBSD-src-5e4b02fe9780f4d6ea81376bcad46e2cf70b5eb3.zip FreeBSD-src-5e4b02fe9780f4d6ea81376bcad46e2cf70b5eb3.tar.gz |
Mark global functions and/or variables in memcontrol(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
Diffstat (limited to 'usr.sbin/memcontrol')
-rw-r--r-- | usr.sbin/memcontrol/memcontrol.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/memcontrol/memcontrol.c b/usr.sbin/memcontrol/memcontrol.c index b6cb25f..542bc3a 100644 --- a/usr.sbin/memcontrol/memcontrol.c +++ b/usr.sbin/memcontrol/memcontrol.c @@ -39,8 +39,7 @@ #include <string.h> #include <unistd.h> -struct -{ +static struct { const char *name; int val; int kind; @@ -67,8 +66,7 @@ static void clearfunc(int memfd, int argc, char *argv[]); static void helpfunc(int memfd, int argc, char *argv[]); static void help(const char *what); -struct -{ +static struct { const char *cmd; const char *desc; void (*func)(int memfd, int argc, char *argv[]); |