From 3847ca54f5782b32ffd767c2fd1ef1dd5fabad72 Mon Sep 17 00:00:00 2001 From: "Justin C. Sherrill" Date: Sat, 16 Nov 2013 23:27:51 -0500 Subject: [PATCH] Use 'static' where appropriate Patch-from: Eitan Adler --- bin/mv/mv.c | 2 +- bin/rcp/rcp.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 3a3c5ea303..b83f72d6e7 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -58,7 +58,7 @@ #endif static int fflg, hflg, iflg, nflg, vflg; -volatile sig_atomic_t info; +static volatile sig_atomic_t info; static int copy(const char *, const char *); static int do_move(const char *, const char *); diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c index 95d3c23ccf..b719b831fa 100644 --- a/bin/rcp/rcp.c +++ b/bin/rcp/rcp.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -69,7 +70,7 @@ #include #include "bsd_locl.h" -char dst_realm_buf[REALM_SZ]; +static char dst_realm_buf[REALM_SZ]; char *dest_realm = NULL; int use_kerberos = 1; CREDENTIALS cred; @@ -85,18 +86,19 @@ int doencrypt = 0; #define OPTIONS "46dfprt" #endif -struct passwd *pwd; -u_short port; -uid_t userid; -int errs, rem; -int pflag, iamremote, iamrecursive, targetshouldbedirectory; -int family = PF_UNSPEC; +static struct passwd *pwd; +static u_short port; +static uid_t userid; +static int errs, rem; +static int pflag, targetshouldbedirectory, iamrecursive; +int iamremote; +static int family = PF_UNSPEC; static int argc_copy; static char **argv_copy; #define CMDNEEDS 64 -char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ +static char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ #ifdef KERBEROS int kerberos(char **, char *, char *, char *); -- 2.11.4.GIT