Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Nov 2011 18:49:10 +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: r227235 - head/usr.bin/comm
Message-ID:  <201111061849.pA6InAD6035871@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Nov  6 18:49:10 2011
New Revision: 227235
URL: http://svn.freebsd.org/changeset/base/227235

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

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

Modified: head/usr.bin/comm/comm.c
==============================================================================
--- head/usr.bin/comm/comm.c	Sun Nov  6 18:49:03 2011	(r227234)
+++ head/usr.bin/comm/comm.c	Sun Nov  6 18:49:10 2011	(r227235)
@@ -57,12 +57,12 @@ __FBSDID("$FreeBSD$");
 #include <wchar.h>
 #include <wctype.h>
 
-int iflag;
-const char *tabs[] = { "", "\t", "\t\t" };
+static int iflag;
+static const char *tabs[] = { "", "\t", "\t\t" };
 
-FILE   *file(const char *);
-wchar_t	*convert(const char *);
-void	show(FILE *, const char *, const char *, char **, size_t *);
+static FILE	*file(const char *);
+static wchar_t	*convert(const char *);
+static void	show(FILE *, const char *, const char *, char **, size_t *);
 static void	usage(void);
 
 int
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
 	exit(0);
 }
 
-wchar_t *
+static wchar_t *
 convert(const char *str)
 {
 	size_t n;
@@ -212,7 +212,7 @@ convert(const char *str)
 	return (buf);
 }
 
-void
+static void
 show(FILE *fp, const char *fn, const char *offset, char **bufp, size_t *buflenp)
 {
 	ssize_t n;
@@ -228,7 +228,7 @@ show(FILE *fp, const char *fn, const cha
 		err(1, "%s", fn);
 }
 
-FILE *
+static FILE *
 file(const char *name)
 {
 	FILE *fp;



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