diff options
author | William Hubbs <williamh@gentoo.org> | 2011-07-20 14:38:55 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2011-07-20 14:38:55 -0500 |
commit | 07694255a4901c33a8ee3ff49701fd49affad2b8 (patch) | |
tree | 6b05e6ab6dc69a0c9f569e0a58b18b48d1de0612 /src/rc | |
parent | 6fa6f9523f80b2fcb49728b349f3eefc3e45a769 (diff) |
rename save and save2 for clarity
The names saveDir and saveLnk seem to better define how these variables
are used.
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/runscript.c | 17 |
1 files changed, 9 insertions, 8 deletions
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); |