summaryrefslogtreecommitdiff
path: root/bin/mv
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2011-08-29 14:45:28 +0000
committerjoerg <joerg@NetBSD.org>2011-08-29 14:45:28 +0000
commit4eeef0bfa2f4161663e912835990652caf22da9d (patch)
treee494e812750a4e6e186fca6539d57693e78cef33 /bin/mv
parentabbeacd94f5c45e246bba95821ef8bf3108c74e1 (diff)
static + __dead
Diffstat (limited to 'bin/mv')
-rw-r--r--bin/mv/mv.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index 55703a74313..7af964f1eff 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mv.c,v 1.42 2011/08/03 04:11:15 manu Exp $ */
+/* $NetBSD: mv.c,v 1.43 2011/08/29 14:46:54 joerg Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\
#if 0
static char sccsid[] = "@(#)mv.c 8.2 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: mv.c,v 1.42 2011/08/03 04:11:15 manu Exp $");
+__RCSID("$NetBSD: mv.c,v 1.43 2011/08/29 14:46:54 joerg Exp $");
#endif
#endif /* not lint */
@@ -65,14 +65,13 @@ __RCSID("$NetBSD: mv.c,v 1.42 2011/08/03 04:11:15 manu Exp $");
#include "pathnames.h"
-int fflg, iflg, vflg;
-int stdin_ok;
+static int fflg, iflg, vflg;
+static int stdin_ok;
-int copy(char *, char *);
-int do_move(char *, char *);
-int fastcopy(char *, char *, struct stat *);
-void usage(void);
-int main(int, char *[]);
+static int copy(char *, char *);
+static int do_move(char *, char *);
+static int fastcopy(char *, char *, struct stat *);
+__dead static void usage(void);
int
main(int argc, char *argv[])
@@ -151,7 +150,7 @@ main(int argc, char *argv[])
/* NOTREACHED */
}
-int
+static int
do_move(char *from, char *to)
{
struct stat sb;
@@ -253,7 +252,7 @@ do_move(char *from, char *to)
fastcopy(from, to, &sb) : copy(from, to));
}
-int
+static int
fastcopy(char *from, char *to, struct stat *sbp)
{
struct timeval tval[2];
@@ -337,7 +336,7 @@ err: if (unlink(to))
return (0);
}
-int
+static int
copy(char *from, char *to)
{
pid_t pid;
@@ -382,7 +381,7 @@ copy(char *from, char *to)
return (0);
}
-void
+static void
usage(void)
{
(void)fprintf(stderr, "usage: %s [-fiv] source target\n"