Date: Sun, 6 Nov 2011 19:02:38 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227259 - head/usr.sbin/rmt Message-ID: <201111061902.pA6J2cmj037169@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Sun Nov 6 19:02:37 2011 New Revision: 227259 URL: http://svn.freebsd.org/changeset/base/227259 Log: Mark global functions and/or variables in rmt(8) static where possible. This allows compilers and static analyzers to do more thorough analysis. Modified: head/usr.sbin/rmt/rmt.c Modified: head/usr.sbin/rmt/rmt.c ============================================================================== --- head/usr.sbin/rmt/rmt.c Sun Nov 6 19:02:31 2011 (r227258) +++ head/usr.sbin/rmt/rmt.c Sun Nov 6 19:02:37 2011 (r227259) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111061902.pA6J2cmj037169>