Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transfer: remove comments, add asserts #14688

Closed
wants to merge 1 commit into from
Closed

Conversation

bagder
Copy link
Member

@bagder bagder commented Aug 26, 2024

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