summaryrefslogtreecommitdiffstats
path: root/bin/ln
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-10-31 08:59:17 +0000
committered <ed@FreeBSD.org>2011-10-31 08:59:17 +0000
commitf58d00c87a547a1f65cf7b990fda6f4e36feb314 (patch)
treeb068d06018284af5aa8b3feab9edb06109d847bc /bin/ln
parent6458f63cb36a7883be28c39ca995cf3e03bfce69 (diff)
downloadFreeBSD-src-f58d00c87a547a1f65cf7b990fda6f4e36feb314.zip
FreeBSD-src-f58d00c87a547a1f65cf7b990fda6f4e36feb314.tar.gz
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.
Diffstat (limited to 'bin/ln')
-rw-r--r--bin/ln/ln.c18
1 files changed, 9 insertions, 9 deletions
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 <string.h>
#include <unistd.h>
-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);
OpenPOWER on IntegriCloud