From 07694255a4901c33a8ee3ff49701fd49affad2b8 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 20 Jul 2011 14:38:55 -0500 Subject: rename save and save2 for clarity The names saveDir and saveLnk seem to better define how these variables are used. --- src/rc/runscript.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/rc') diff --git a/src/rc/runscript.c b/src/rc/runscript.c index f62e8dc9..0907ce1a 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -1100,7 +1100,8 @@ runscript(int argc, char **argv) bool doneone = false; int retval, opt, depoptions = RC_DEP_TRACE; RC_STRING *svc; - char path[PATH_MAX], lnk[PATH_MAX], *dir, *save = NULL, *save2 = NULL; + char path[PATH_MAX], lnk[PATH_MAX]; + char *dir, *saveDir = NULL, *saveLnk = NULL; char pidstr[10]; size_t l = 0, ll; const char *file; @@ -1132,14 +1133,14 @@ runscript(int argc, char **argv) if (readlink(argv[1], lnk, sizeof(lnk)-1)) { dir = dirname(path); if (strchr(lnk, '/')) { - save = xstrdup(dir); - save2 = xstrdup(lnk); - dir = dirname(save2); - if (strcmp(dir, save) == 0) + saveDir = xstrdup(dir); + saveLnk = xstrdup(lnk); + dir = dirname(saveLnk); + if (strcmp(dir, saveDir) == 0) file = basename_c(argv[1]); else file = basename_c(lnk); - dir = save; + dir = saveDir; } else file = basename_c(argv[1]); ll = strlen(dir) + strlen(file) + 2; @@ -1149,8 +1150,8 @@ runscript(int argc, char **argv) free(service); service = xstrdup(lnk); } - free(save); - free(save2); + free(saveDir); + free(saveLnk); } if (!service) service = xstrdup(path); -- cgit v1.2.3