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

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

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

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

Modified: head/usr.bin/paste/paste.c
==============================================================================
--- head/usr.bin/paste/paste.c	Sun Nov  6 18:49:48 2011	(r227241)
+++ head/usr.bin/paste/paste.c	Sun Nov  6 18:49:53 2011	(r227242)
@@ -57,15 +57,15 @@ __FBSDID("$FreeBSD$");
 #include <unistd.h>
 #include <wchar.h>
 
-wchar_t *delim;
-int delimcnt;
+static wchar_t *delim;
+static int delimcnt;
 
-int parallel(char **);
-int sequential(char **);
-int tr(wchar_t *);
+static int parallel(char **);
+static int sequential(char **);
+static int tr(wchar_t *);
 static void usage(void);
 
-wchar_t tab[] = L"\t";
+static wchar_t tab[] = L"\t";
 
 int
 main(int argc, char *argv[])
@@ -125,7 +125,7 @@ typedef struct _list {
 	char *name;
 } LIST;
 
-int
+static int
 parallel(char **argv)
 {
 	LIST *lp;
@@ -195,7 +195,7 @@ parallel(char **argv)
 	return (0);
 }
 
-int
+static int
 sequential(char **argv)
 {
 	FILE *fp;
@@ -235,7 +235,7 @@ sequential(char **argv)
 	return (failed != 0);
 }
 
-int
+static int
 tr(wchar_t *arg)
 {
 	int cnt;



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