diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-07-12 03:07:23 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-07-12 03:07:23 +0000 |
commit | 6de4614ca1160e717136ea6907a022060465cbc6 (patch) | |
tree | 5ef506b604c9b565a39c82eece2028b2965dd0ba | |
parent | 5dfa1b8358c61d028262cd13e70bfd7955b851bc (diff) |
Eliminate some annoying variable shadowing
-rw-r--r-- | usr.bin/rdist/client.c | 26 | ||||
-rw-r--r-- | usr.bin/rdist/rdist.c | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/usr.bin/rdist/client.c b/usr.bin/rdist/client.c index 2673884f50b..4e0a3d0c2c2 100644 --- a/usr.bin/rdist/client.c +++ b/usr.bin/rdist/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.29 2014/07/05 06:55:29 guenther Exp $ */ +/* $OpenBSD: client.c,v 1.30 2014/07/12 03:07:22 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -1037,7 +1037,7 @@ dostat(char *file, struct stat *statbuf, opt_t opts) * We need to just change file info. */ static int -statupdate(int u, char *target, opt_t opts, char *rname, int destdir, +statupdate(int u, char *starget, opt_t opts, char *rname, int destdir, struct stat *st, char *user, char *group) { int rv = 0; @@ -1048,12 +1048,12 @@ statupdate(int u, char *target, opt_t opts, char *rname, int destdir, if (IS_ON(opts, DO_VERIFY)) { message(MT_INFO, "%s: need to change to perm %04o, owner %s, group %s", - target, lmode, user, group); - runspecial(target, opts, rname, destdir); + starget, lmode, user, group); + runspecial(starget, opts, rname, destdir); } else { message(MT_CHANGE, "%s: change to perm %04o, owner %s, group %s", - target, lmode, user, group); + starget, lmode, user, group); ENCODE(ername, rname); (void) sendcmd(C_CHMOG, "%lo %04o %s %s %s", opts, lmode, user, group, ername); @@ -1069,7 +1069,7 @@ statupdate(int u, char *target, opt_t opts, char *rname, int destdir, * We need to install/update: */ static int -fullupdate(int u, char *target, opt_t opts, char *rname, int destdir, +fullupdate(int u, char *starget, opt_t opts, char *rname, int destdir, struct stat *st, char *user, char *group) { /* @@ -1077,12 +1077,12 @@ fullupdate(int u, char *target, opt_t opts, char *rname, int destdir, */ if (u == US_NOENT) { if (IS_ON(opts, DO_VERIFY)) { - message(MT_INFO, "%s: need to install", target); - runspecial(target, opts, rname, destdir); + message(MT_INFO, "%s: need to install", starget); + runspecial(starget, opts, rname, destdir); return(1); } if (!IS_ON(opts, DO_QUIET)) - message(MT_CHANGE, "%s: installing", target); + message(MT_CHANGE, "%s: installing", starget); FLAG_OFF(opts, (DO_COMPARE|DO_REMOVE)); } @@ -1108,16 +1108,16 @@ fullupdate(int u, char *target, opt_t opts, char *rname, int destdir, } else if (S_ISREG(st->st_mode)) { if (u == US_OUTDATE) { if (IS_ON(opts, DO_VERIFY)) { - message(MT_INFO, "%s: need to update", target); - runspecial(target, opts, rname, destdir); + message(MT_INFO, "%s: need to update", starget); + runspecial(starget, opts, rname, destdir); return(1); } if (!IS_ON(opts, DO_QUIET)) - message(MT_CHANGE, "%s: updating", target); + message(MT_CHANGE, "%s: updating", starget); } return (sendfile(rname, opts, st, user, group, destdir) == 0); } else { - message(MT_INFO, "%s: unknown file type 0%o", target, + message(MT_INFO, "%s: unknown file type 0%o", starget, st->st_mode); return(0); } diff --git a/usr.bin/rdist/rdist.c b/usr.bin/rdist/rdist.c index f156c959211..358c32a5416 100644 --- a/usr.bin/rdist/rdist.c +++ b/usr.bin/rdist/rdist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rdist.c,v 1.26 2014/07/12 02:58:18 guenther Exp $ */ +/* $OpenBSD: rdist.c,v 1.27 2014/07/12 03:07:22 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -39,7 +39,6 @@ * Remote distribution program. */ -char *distfile = NULL; /* Name of distfile to use */ int maxchildren = MAXCHILDREN; /* Max no of concurrent PIDs */ int nflag = 0; /* Say without doing */ int64_t min_freespace = 0; /* Min filesys free space */ @@ -84,6 +83,7 @@ main(int argc, char **argv, char **envp) { extern char *__progname; struct namelist *hostlist = NULL; + char *distfile = NULL; char *cp; int cmdargs = 0; int c; |