Use a more descriptive global variable name in server code, also
to avoid colliding with this name used elsewhere in libcurl.
This isn't causing an issue at this time, but makes the code prone
to `-Wshadow` warnings in unity mode, if the global variable is
compiled first. This specific variable could collide with the `path`
argument of the `curlx_win32_stat()` function.
Closes #16719
else if(!strcmp("--srcdir", argv[arg])) {
arg++;
if(argc > arg) {
- path = argv[arg];
+ srcpath = argv[arg];
arg++;
}
}
else if(!strcmp("--srcdir", argv[arg])) {
arg++;
if(argc > arg) {
- path = argv[arg];
+ srcpath = argv[arg];
arg++;
}
}
else if(!strcmp("--srcdir", argv[arg])) {
arg++;
if(argc > arg) {
- path = argv[arg];
+ srcpath = argv[arg];
arg++;
}
}
#endif /* _WIN32 */
/* set by the main code to point to where the test dir is */
-const char *path = ".";
+const char *srcpath = ".";
FILE *test2fopen(long testno, const char *logdir2)
{
return stream;
/* then try the source version */
- msnprintf(filename, sizeof(filename), "%s/data/test%ld", path, testno);
+ msnprintf(filename, sizeof(filename), "%s/data/test%ld", srcpath, testno);
stream = fopen(filename, "rb");
return stream;
#define SERVERLOGS_LOCKDIR "lock" /* within logdir */
/* global variables */
-extern const char *path; /* where to find the 'data' dir */
+extern const char *srcpath; /* where to find the 'data' dir */
extern const char *pidname;
extern const char *portname;
extern const char *serverlogfile; /* log file name */