Renamed a couple of global variables to avoid shadowing warnings

This commit is contained in:
Yang Tse
2007-10-02 16:05:28 +00:00
parent 048bfeaaef
commit 059707be32
13 changed files with 32 additions and 32 deletions

View File

@@ -49,36 +49,36 @@ int test(char *URL)
const char *buf_1 = "RNFR 505";
const char *buf_2 = "RNTO 505-forreal";
if (!arg2) {
if (!libtest_arg2) {
fprintf(stderr, "Usage: <url> <file-to-upload>\n");
return -1;
}
/* get the file size of the local file */
hd = stat(arg2, &file_info);
hd = stat(libtest_arg2, &file_info);
if(hd == -1) {
/* can't open file, bail out */
error = ERRNO;
fprintf(stderr, "stat() failed with error: %d %s\n",
error, strerror(error));
fprintf(stderr, "WARNING: cannot open file %s\n", arg2);
fprintf(stderr, "WARNING: cannot open file %s\n", libtest_arg2);
return -1;
}
if(! file_info.st_size) {
fprintf(stderr, "WARNING: file %s has no size!\n", arg2);
fprintf(stderr, "WARNING: file %s has no size!\n", libtest_arg2);
return -4;
}
/* get a FILE * of the same file, could also be made with
fdopen() from the previous descriptor, but hey this is just
an example! */
hd_src = fopen(arg2, "rb");
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
error = ERRNO;
fprintf(stderr, "fopen() failed with error: %d %s\n",
error, strerror(error));
fprintf(stderr, "Error opening file: %s\n", arg2);
fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
return -2; /* if this happens things are major weird */
}