From d938340a938e9e9c3f792901111163d994892285 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 6 Nov 2011 19:01:54 +0000 Subject: [PATCH] Mark global functions and/or variables in fdread(8) static where possible. This allows compilers and static analyzers to do more thorough analysis. --- usr.sbin/fdread/fdread.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/fdread/fdread.c b/usr.sbin/fdread/fdread.c index ba9c758bbc7b..770f92d36cbb 100644 --- a/usr.sbin/fdread/fdread.c +++ b/usr.sbin/fdread/fdread.c @@ -44,14 +44,14 @@ #include "fdutil.h" -int quiet, recover; -unsigned char fillbyte = 0xf0; /* "foo" */ +static int quiet, recover; +static unsigned char fillbyte = 0xf0; /* "foo" */ -int doread(int fd, FILE *of, const char *_devname); -int doreadid(int fd, unsigned int numids, unsigned int trackno); -void usage(void); +static int doread(int fd, FILE *of, const char *_devname); +static int doreadid(int fd, unsigned int numids, unsigned int trackno); +static void usage(void); -void +static void usage(void) { @@ -155,7 +155,7 @@ main(int argc, char **argv) return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname)); } -int +static int doread(int fd, FILE *of, const char *_devname) { char *trackbuf; @@ -294,7 +294,7 @@ doread(int fd, FILE *of, const char *_devname) return (nerrs? EX_IOERR: EX_OK); } -int +static int doreadid(int fd, unsigned int numids, unsigned int trackno) { int rv = 0;