aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib541.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib541.c')
-rw-r--r--tests/libtest/lib541.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c
index 3ab1e2595..71d2e38ed 100644
--- a/tests/libtest/lib541.c
+++ b/tests/libtest/lib541.c
@@ -41,36 +41,36 @@ int test(char *URL)
struct_stat file_info;
int error;
- 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 */
}