* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
int hd;
struct_stat file_info;
struct curl_slist *hl;
- int error;
- struct curl_slist *headerlist=NULL;
+ struct curl_slist *headerlist = NULL;
const char *buf_1 = "RNFR 505";
const char *buf_2 = "RNTO 505-forreal";
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
- error = ERRNO;
fprintf(stderr, "fopen failed with error: %d %s\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */
}
hd = fstat(fileno(hd_src), &file_info);
if(hd == -1) {
/* can't open file, bail out */
- error = ERRNO;
fprintf(stderr, "fstat() failed with error: %d %s\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "ERROR: cannot open file %s\n", libtest_arg2);
fclose(hd_src);
return TEST_ERR_MAJOR_BAD;