Skip to content

transfer: remove comments, add asserts - #14688

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/xfer-fixups
Closed

bagder wants to merge 1 commit into
masterfrom
bagder/xfer-fixups

Conversation

@bagder

@bagder bagder commented Aug 26, 2024

Copy link
Copy Markdown
Member

Curl_xfer_send and Curl_xfer_recv had commented FIXMEs about protocol setting up the transfers badly, but in reality these functions are too low-level to be able to depend on the protocol transfer setups having been done yet. Removed.

The functions had checks for data and data->conn that I convered to asserts since they SHOULD always be valid in this function. The same goes for the runtime check for buffer_size > 0 that I also converted to an assert since that should never be set to an invalid value.

Curl_xfer_send and Curl_xfer_recv had commented FIXMEs about protocol
setting up the transfers badly, but in reality these functions are too
low-level to be able to depend on the protocol transfer setups having
been done yet. Removed.

The functions had checks for data and data->conn that I convered to
asserts since they SHOULD always be valid in this function. The same
goes for the runtime check for buffer_size > 0 that I also converted to
an assert since that should never be set to an invalid value.
@bagder
bagder marked this pull request as ready for review August 26, 2024 13:01
@bagder bagder closed this in 8132b17 Aug 26, 2024
@bagder
bagder deleted the bagder/xfer-fixups branch August 26, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants