From: Tim Kientzle Date: Sat, 4 Jul 2009 07:19:18 +0000 (-0400) Subject: Sync with recent changes to tar/test/main.c. No functional change. X-Git-Tag: v2.8.0~546 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ea5aedbf2bea94f2fad592c38f2f40d475a830f;p=thirdparty%2Flibarchive.git Sync with recent changes to tar/test/main.c. No functional change. SVN-Revision: 1213 --- diff --git a/libarchive/test/main.c b/libarchive/test/main.c index f8e66d667..fa6985a8a 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -1051,9 +1051,6 @@ int main(int argc, char **argv) int i, tests_run = 0, tests_failed = 0, option; time_t now; char *refdir_alloc = NULL; -#if defined(_WIN32) && !defined(__CYGWIN__) - char *testprg; -#endif const char *progname; const char *tmp, *option_arg, *p; char tmpdir[256]; @@ -1166,18 +1163,20 @@ int main(int argc, char **argv) #ifdef PROGRAM if (testprog == NULL) usage(progname); -#endif #if defined(_WIN32) && !defined(__CYGWIN__) /* * command.com cannot accept the command used '/' with drive * name such as c:/xxx/command.exe when use '|' pipe handling. */ - testprg = strdup(testprog); - for (i = 0; testprg[i] != '\0'; i++) { - if (testprg[i] == '/') - testprg[i] = '\\'; + { + char *testprg = strdup(testprog); + for (i = 0; testprg[i] != '\0'; i++) { + if (testprg[i] == '/') + testprg[i] = '\\'; + } + testprog = testprg; } - testprog = testprg; +#endif #endif /*