svn commit: r227240 - head/usr.bin/lam

Ed Schouten ed at FreeBSD.org
Sun Nov 6 18:49:42 UTC 2011


Author: ed
Date: Sun Nov  6 18:49:41 2011
New Revision: 227240
URL: http://svn.freebsd.org/changeset/base/227240

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

Modified:
  head/usr.bin/lam/lam.c

Modified: head/usr.bin/lam/lam.c
==============================================================================
--- head/usr.bin/lam/lam.c	Sun Nov  6 18:49:36 2011	(r227239)
+++ head/usr.bin/lam/lam.c	Sun Nov  6 18:49:41 2011	(r227240)
@@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$");
 #define	MAXOFILES	20
 #define	BIGBUFSIZ	5 * BUFSIZ
 
-struct	openfile {		/* open file structure */
+static struct openfile {	/* open file structure */
 	FILE	*fp;		/* file pointer */
 	short	eof;		/* eof flag */
 	short	pad;		/* pad flag for missing columns */
@@ -64,10 +64,10 @@ struct	openfile {		/* open file structur
 	const char *format;	/* printf(3) style string spec. */
 }	input[MAXOFILES];
 
-int	morefiles;		/* set by getargs(), changed by gatherline() */
-int	nofinalnl;		/* normally append \n to each output line */
-char	line[BIGBUFSIZ];
-char	*linep;
+static int	morefiles;	/* set by getargs(), changed by gatherline() */
+static int	nofinalnl;	/* normally append \n to each output line */
+static char	line[BIGBUFSIZ];
+static char	*linep;
 
 static char    *gatherline(struct openfile *);
 static void	getargs(char *[]);


More information about the svn-src-head mailing list