]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_ssls: fix "ignored return value" warning
authorDaniel Stenberg <daniel@haxx.se>
Thu, 9 Jan 2025 07:25:36 +0000 (08:25 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 9 Jan 2025 16:24:47 +0000 (17:24 +0100)
Pointed out by CodeSonar. While harmless, we might as well address it.

Closes #15949

src/tool_ssls.c

index 48b20de50bd828d22445b95468c994a73ccf1450..55e1b56447e613badebca77f4e72a577eaa52e46 100644 (file)
@@ -48,7 +48,7 @@ static CURLcode tool_ssls_easy(struct GlobalConfig *global,
     return CURLE_OUT_OF_MEMORY;
 
   result = curl_easy_setopt(*peasy, CURLOPT_SHARE, share);
-  if(global->tracetype != TRACE_NONE) {
+  if(!result && (global->tracetype != TRACE_NONE)) {
     my_setopt(*peasy, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
     my_setopt(*peasy, CURLOPT_DEBUGDATA, config);
     my_setopt(*peasy, CURLOPT_VERBOSE, 1L);