]> git.ipfire.org Git - thirdparty/curl.git/commit
transfer: fix returning init failures from `xfer_recv_shutdown_started()`
authorViktor Szakats <commit@vsz.me>
Tue, 4 Feb 2025 17:15:22 +0000 (18:15 +0100)
committerViktor Szakats <commit@vsz.me>
Wed, 5 Feb 2025 00:12:18 +0000 (01:12 +0100)
commitc9afcecee94284e754d82354c79e4e37f09bff61
tree79037c5fa2d5b43e8d2200c5d33a098c96a08a9e
parent255e3b64df3940c5ad2cf1e8cc02bcfbdeb3ca4b
transfer: fix returning init failures from `xfer_recv_shutdown_started()`

Before this patch it returned `CURLE_FAILED_INIT` on init failures, with
the value of 2. Fix it to return `false`.

Seen with clang 18.1.8:
```
../lib/transfer.c(181,12): warning: integer constant not in range of enumerated type 'bool' [-Wassign-enum]
  181 |     return CURLE_FAILED_INIT;
      |            ^
../lib/transfer.c(181,12): warning: implicit conversion from enumeration type 'CURLcode' to different enumeration type 'bool' [-Wenum-conversion]
  181 |     return CURLE_FAILED_INIT;
      |     ~~~~~~ ^~~~~~~~~~~~~~~~~
../lib/transfer.c(183,12): warning: integer constant not in range of enumerated type 'bool' [-Wassign-enum]
  183 |     return CURLE_FAILED_INIT;
      |            ^
../lib/transfer.c(183,12): warning: implicit conversion from enumeration type 'CURLcode' to different enumeration type 'bool' [-Wenum-conversion]
  183 |     return CURLE_FAILED_INIT;
      |     ~~~~~~ ^~~~~~~~~~~~~~~~~
```

Follow-up to 35bf766280a77cde3055e0f4e249ab02a0dcd275 #14253

Closes #16170
lib/transfer.c