diff options
author | ed <ed@FreeBSD.org> | 2011-11-06 19:01:54 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-11-06 19:01:54 +0000 |
commit | 32375b4cab09ed500243e98e3f5620b9b9017714 (patch) | |
tree | 94628b6f74e9bc38becc64448e2228eb652193f8 /usr.sbin/fdread | |
parent | 2aa810aa99a1853a77856048566d6983bebe748d (diff) | |
download | FreeBSD-src-32375b4cab09ed500243e98e3f5620b9b9017714.zip FreeBSD-src-32375b4cab09ed500243e98e3f5620b9b9017714.tar.gz |
Mark global functions and/or variables in fdread(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
Diffstat (limited to 'usr.sbin/fdread')
-rw-r--r-- | usr.sbin/fdread/fdread.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/fdread/fdread.c b/usr.sbin/fdread/fdread.c index ba9c758..770f92d 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; |