runscript: rename saveDir back to save to fix compile error

This commit is contained in:
William Hubbs 2011-07-26 16:58:42 -05:00
parent df1f02ac84
commit 370e5c775a

View File

@ -1101,7 +1101,7 @@ runscript(int argc, char **argv)
int retval, opt, depoptions = RC_DEP_TRACE; int retval, opt, depoptions = RC_DEP_TRACE;
RC_STRING *svc; RC_STRING *svc;
char path[PATH_MAX], lnk[PATH_MAX]; char path[PATH_MAX], lnk[PATH_MAX];
char *dir, *saveDir = NULL, *saveLnk = NULL; char *dir, *save = NULL, *saveLnk = NULL;
char pidstr[10]; char pidstr[10];
size_t l = 0, ll; size_t l = 0, ll;
const char *file; const char *file;
@ -1133,14 +1133,14 @@ runscript(int argc, char **argv)
if (readlink(argv[1], lnk, sizeof(lnk)-1)) { if (readlink(argv[1], lnk, sizeof(lnk)-1)) {
dir = dirname(path); dir = dirname(path);
if (strchr(lnk, '/')) { if (strchr(lnk, '/')) {
saveDir = xstrdup(dir); save = xstrdup(dir);
saveLnk = xstrdup(lnk); saveLnk = xstrdup(lnk);
dir = dirname(saveLnk); dir = dirname(saveLnk);
if (strcmp(dir, saveDir) == 0) if (strcmp(dir, save) == 0)
file = basename_c(argv[1]); file = basename_c(argv[1]);
else else
file = basename_c(lnk); file = basename_c(lnk);
dir = saveDir; dir = save;
} else } else
file = basename_c(argv[1]); file = basename_c(argv[1]);
ll = strlen(dir) + strlen(file) + 2; ll = strlen(dir) + strlen(file) + 2;
@ -1150,7 +1150,7 @@ runscript(int argc, char **argv)
free(service); free(service);
service = xstrdup(lnk); service = xstrdup(lnk);
} }
free(saveDir); free(save);
free(saveLnk); free(saveLnk);
} }
if (!service) if (!service)