lib: fix gcc warning in printf call

Do not pass NULL to printf %s.

Seen with gcc 13.2.0 on Debian:
```
.../curl/lib/connect.c:696:27: warning: '%s' directive argument is null [-Wformat-overflow=]
```
Ref: https://github.com/curl/curl-for-win/actions/runs/6476161689/job/17584426483#step:3:11104

Ref: #10284
Co-authored-by: Jay Satiro
Closes #12082
This commit is contained in:
Viktor Szakats 2023-10-11 04:02:45 +00:00
parent 465f02bf17
commit 4e57d0f0cb
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -693,11 +693,11 @@ evaluate:
result = CURLE_COULDNT_CONNECT;
for(i = 0; i < sizeof(ctx->baller)/sizeof(ctx->baller[0]); i++) {
struct eyeballer *baller = ctx->baller[i];
if(!baller)
continue;
CURL_TRC_CF(data, cf, "%s assess started=%d, result=%d",
baller?baller->name:NULL,
baller?baller->has_started:0,
baller?baller->result:0);
if(baller && baller->has_started && baller->result) {
baller->name, baller->has_started, baller->result);
if(baller->has_started && baller->result) {
result = baller->result;
break;
}