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

connectdata struct reorgs #6534

Closed
wants to merge 6 commits into from
Closed

connectdata struct reorgs #6534

wants to merge 6 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Jan 26, 2021

Removes duplicate struct entries, changes struct field sizes and reorder them a bit. Cuts off 136 bytes from the connectdata struct with no loss of functionality and no added size in other structs.

From 1832 bytes with 5 "holes" in my build before this PR. At 1696 bytes with one hole afterward.

... as the numerical IP address is already stored and kept in 'primary_ip'.
... and use 'int' for ports. We don't use 'unsigned short' since -1 is
still often used internally to signify "unknown value" and 0 - 65535 are
all valid port numbers.
As the info is already stored in the transfer handle anyway, there's no
need to carry around a duplicate buffer for the life time of the handle.
... and rely only on the value already set in Curl_easy.
@bagder bagder closed this in 642d780 Jan 27, 2021
bagder added a commit that referenced this pull request Jan 27, 2021
... and use 'int' for ports. We don't use 'unsigned short' since -1 is
still often used internally to signify "unknown value" and 0 - 65535 are
all valid port numbers.

Closes #6534
bagder added a commit that referenced this pull request Jan 27, 2021
As the info is already stored in the transfer handle anyway, there's no
need to carry around a duplicate buffer for the life-time of the handle.

Closes #6534
bagder added a commit that referenced this pull request Jan 27, 2021
... and rely only on the value already set in Curl_easy.

Closes #6534
bagder added a commit that referenced this pull request Jan 27, 2021
bagder added a commit that referenced this pull request Jan 27, 2021
To optimize storage slightly.

Closes #6534
@bagder bagder deleted the bagder/struct-reorgs branch January 27, 2021 08:19
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.

None yet

1 participant