summaryrefslogtreecommitdiffstats
path: root/usr.bin/comm
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-06 18:49:10 +0000
committered <ed@FreeBSD.org>2011-11-06 18:49:10 +0000
commitba068938d1c863781a99fb1a5c2287f9cc333841 (patch)
tree41cb5740d3b8f16cd5ba5b19cc67d85d16a10dbb /usr.bin/comm
parent3894f3031c9095f3b1905c78002d4a5886ad3428 (diff)
downloadFreeBSD-src-ba068938d1c863781a99fb1a5c2287f9cc333841.zip
FreeBSD-src-ba068938d1c863781a99fb1a5c2287f9cc333841.tar.gz
Mark global functions and/or variables in comm(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
Diffstat (limited to 'usr.bin/comm')
-rw-r--r--usr.bin/comm/comm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/comm/comm.c b/usr.bin/comm/comm.c
index c6729e6..54763e1 100644
--- a/usr.bin/comm/comm.c
+++ b/usr.bin/comm/comm.c
@@ -57,12 +57,12 @@ __FBSDID("$FreeBSD$");
#include <wchar.h>
#include <wctype.h>
-int iflag;
-const char *tabs[] = { "", "\t", "\t\t" };
+static int iflag;
+static const char *tabs[] = { "", "\t", "\t\t" };
-FILE *file(const char *);
-wchar_t *convert(const char *);
-void show(FILE *, const char *, const char *, char **, size_t *);
+static FILE *file(const char *);
+static wchar_t *convert(const char *);
+static void show(FILE *, const char *, const char *, char **, size_t *);
static void usage(void);
int
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
exit(0);
}
-wchar_t *
+static wchar_t *
convert(const char *str)
{
size_t n;
@@ -212,7 +212,7 @@ convert(const char *str)
return (buf);
}
-void
+static void
show(FILE *fp, const char *fn, const char *offset, char **bufp, size_t *buflenp)
{
ssize_t n;
@@ -228,7 +228,7 @@ show(FILE *fp, const char *fn, const char *offset, char **bufp, size_t *buflenp)
err(1, "%s", fn);
}
-FILE *
+static FILE *
file(const char *name)
{
FILE *fp;
OpenPOWER on IntegriCloud