diff options
author | ed <ed@FreeBSD.org> | 2011-11-06 18:49:53 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-11-06 18:49:53 +0000 |
commit | 5675f1d7a701ddc39bd6bec39866716916254e12 (patch) | |
tree | 4c060c72308266f53ae46b543a774df3196cb037 | |
parent | bfc6ddd863312885df4f946aef871e51e4315ee2 (diff) | |
download | FreeBSD-src-5675f1d7a701ddc39bd6bec39866716916254e12.zip FreeBSD-src-5675f1d7a701ddc39bd6bec39866716916254e12.tar.gz |
Mark global functions and/or variables in paste(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
-rw-r--r-- | usr.bin/paste/paste.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index e907d2c..f03f784 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -57,15 +57,15 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #include <wchar.h> -wchar_t *delim; -int delimcnt; +static wchar_t *delim; +static int delimcnt; -int parallel(char **); -int sequential(char **); -int tr(wchar_t *); +static int parallel(char **); +static int sequential(char **); +static int tr(wchar_t *); static void usage(void); -wchar_t tab[] = L"\t"; +static wchar_t tab[] = L"\t"; int main(int argc, char *argv[]) @@ -125,7 +125,7 @@ typedef struct _list { char *name; } LIST; -int +static int parallel(char **argv) { LIST *lp; @@ -195,7 +195,7 @@ parallel(char **argv) return (0); } -int +static int sequential(char **argv) { FILE *fp; @@ -235,7 +235,7 @@ sequential(char **argv) return (failed != 0); } -int +static int tr(wchar_t *arg) { int cnt; |