← Commit list

28341c303d

Viktor Szakats
Viktor Szakats
2026-06-01
SUCCESS Duration: 240s

Subject

lib505: tidy up slist pointer use

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/libtest/lib505.c+8 -9
@@ -38,9 +38,8 @@ static CURLcode test_lib505(const char *URL)
FILE *hd_src;
int hd;
curlx_struct_stat file_info;
- struct curl_slist *hl;
-
- struct curl_slist *headerlist = NULL;
+ struct curl_slist *headerlist;
+ struct curl_slist *temp;
static const char *buf_1 = "RNFR 505";
static const char *buf_2 = "RNTO 505-forreal";
@@ -92,24 +91,24 @@ static CURLcode test_lib505(const char *URL)
/* build a list of commands to pass to libcurl */
- hl = curl_slist_append(headerlist, buf_1);
- if(!hl) {
+ headerlist = curl_slist_append(NULL, buf_1);
+ if(!headerlist) {
curl_mfprintf(stderr, "curl_slist_append() failed\n");
curl_easy_cleanup(curl);
curl_global_cleanup();
curlx_fclose(hd_src);
return TEST_ERR_MAJOR_BAD;
}
- headerlist = curl_slist_append(hl, buf_2);
- if(!headerlist) {
+ temp = curl_slist_append(headerlist, buf_2);
+ if(!temp) {
curl_mfprintf(stderr, "curl_slist_append() failed\n");
- curl_slist_free_all(hl);
+ curl_slist_free_all(headerlist);
curl_easy_cleanup(curl);
curl_global_cleanup();
curlx_fclose(hd_src);
return TEST_ERR_MAJOR_BAD;
}
- headerlist = hl;
+ headerlist = temp;
/* enable uploading */
test_setopt(curl, CURLOPT_UPLOAD, 1L);