aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rmt/rmt.c
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2011-11-06 19:02:37 +0000
committerEd Schouten <ed@FreeBSD.org>2011-11-06 19:02:37 +0000
commit0aa42e81b286d60ae04f2dce7b5ce92d0649920b (patch)
treef8a5ac3311740f181579e1c4736c2cfa380652c8 /usr.sbin/rmt/rmt.c
parentd1931b80656d597bfee8368e199bd0daa58929e4 (diff)
downloadsrc-0aa42e81b286d60ae04f2dce7b5ce92d0649920b.tar.gz
src-0aa42e81b286d60ae04f2dce7b5ce92d0649920b.zip
Mark global functions and/or variables in rmt(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
Notes
Notes: svn path=/head/; revision=227259
Diffstat (limited to 'usr.sbin/rmt/rmt.c')
-rw-r--r--usr.sbin/rmt/rmt.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/rmt/rmt.c b/usr.sbin/rmt/rmt.c
index f5e3cc14d013..a5c048faee2f 100644
--- a/usr.sbin/rmt/rmt.c
+++ b/usr.sbin/rmt/rmt.c
@@ -54,25 +54,25 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
-int tape = -1;
+static int tape = -1;
-char *record;
-int maxrecsize = -1;
+static char *record;
+static int maxrecsize = -1;
#define SSIZE 64
-char device[SSIZE];
-char count[SSIZE], mode[SSIZE], pos[SSIZE], op[SSIZE];
+static char device[SSIZE];
+static char count[SSIZE], mode[SSIZE], pos[SSIZE], op[SSIZE];
-char resp[BUFSIZ];
+static char resp[BUFSIZ];
-FILE *debug;
+static FILE *debug;
#define DEBUG(f) if (debug) fprintf(debug, f)
#define DEBUG1(f,a) if (debug) fprintf(debug, f, a)
#define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2)
-char *checkbuf(char *, int);
-void error(int);
-void getstring(char *);
+static char *checkbuf(char *, int);
+static void error(int);
+static void getstring(char *);
int
main(int argc, char **argv)
@@ -220,7 +220,7 @@ getstring(char *bp)
cp[i] = '\0';
}
-char *
+static char *
checkbuf(char *rec, int size)
{
@@ -240,7 +240,7 @@ checkbuf(char *rec, int size)
return (rec);
}
-void
+static void
error(int num)
{