From f58d00c87a547a1f65cf7b990fda6f4e36feb314 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 31 Oct 2011 08:59:17 +0000 Subject: Put some static keywords in the source code. For these simple utilities, it doesn't harm to make all global variables static. In fact, this allows the compiler to perform better forms of optimisation and analysis. --- bin/ln/ln.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bin/ln') diff --git a/bin/ln/ln.c b/bin/ln/ln.c index e5fdeee..4169e62 100644 --- a/bin/ln/ln.c +++ b/bin/ln/ln.c @@ -54,16 +54,16 @@ __FBSDID("$FreeBSD$"); #include #include -int fflag; /* Unlink existing files. */ -int Fflag; /* Remove empty directories also. */ -int hflag; /* Check new name for symlink first. */ -int iflag; /* Interactive mode. */ -int Pflag; /* Create hard links to symlinks. */ -int sflag; /* Symbolic, not hard, link. */ -int vflag; /* Verbose output. */ -int wflag; /* Warn if symlink target does not +static int fflag; /* Unlink existing files. */ +static int Fflag; /* Remove empty directories also. */ +static int hflag; /* Check new name for symlink first. */ +static int iflag; /* Interactive mode. */ +static int Pflag; /* Create hard links to symlinks. */ +static int sflag; /* Symbolic, not hard, link. */ +static int vflag; /* Verbose output. */ +static int wflag; /* Warn if symlink target does not * exist, and -f is not enabled. */ -char linkch; +static char linkch; int linkit(const char *, const char *, int); void usage(void); -- cgit v1.1