Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Nov 2011 19:01:54 +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: r227253 - head/usr.sbin/fdread
Message-ID:  <201111061901.pA6J1sM6036933@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Nov  6 19:01:54 2011
New Revision: 227253
URL: http://svn.freebsd.org/changeset/base/227253

Log:
  Mark global functions and/or variables in fdread(8) static where possible.
  
  This allows compilers and static analyzers to do more thorough analysis.

Modified:
  head/usr.sbin/fdread/fdread.c

Modified: head/usr.sbin/fdread/fdread.c
==============================================================================
--- head/usr.sbin/fdread/fdread.c	Sun Nov  6 19:01:48 2011	(r227252)
+++ head/usr.sbin/fdread/fdread.c	Sun Nov  6 19:01:54 2011	(r227253)
@@ -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 *_de
 	return (nerrs? EX_IOERR: EX_OK);
 }
 
-int
+static int
 doreadid(int fd, unsigned int numids, unsigned int trackno)
 {
 	int rv = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111061901.pA6J1sM6036933>