Skip to content

cookie: simplify strstore(), remove outdated comment#21541

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/cookie-strstore
Closed

cookie: simplify strstore(), remove outdated comment#21541
bagder wants to merge 1 commit into
masterfrom
bagder/cookie-strstore

Conversation

@bagder

@bagder bagder commented May 9, 2026

Copy link
Copy Markdown
Member

No description provided.

@bagder bagder added the cookies label May 9, 2026
@github-actions github-actions Bot added the HTTP label May 9, 2026
@bagder bagder marked this pull request as ready for review May 9, 2026 13:31
@bagder bagder requested a review from Copilot May 9, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies strstore() in lib/cookie.c by removing a now-unnecessary zero-length special case and updating the accompanying comment to reflect current behavior (it’s a wrapper around curlx_memdup0() rather than the previously described semantics).

Changes:

  • Remove the len == 0 special-casing in strstore() and rely on curlx_memdup0()’s built-in handling of zero-length inputs.
  • Update the strstore() header comment to match the actual implementation and remove outdated/incorrect description.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in b944940 May 9, 2026
@bagder bagder deleted the bagder/cookie-strstore branch May 9, 2026 22:31
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants