Skip to content

noproxy: simplify, don't mix const non-const in strchr()#20425

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/noprox-const
Closed

noproxy: simplify, don't mix const non-const in strchr()#20425
bagder wants to merge 1 commit intomasterfrom
bagder/noprox-const

Conversation

@bagder
Copy link
Member

@bagder bagder commented Jan 25, 2026

Ref: #20420

@bagder bagder requested a review from Copilot January 25, 2026 09:50
@bagder bagder marked this pull request as ready for review January 25, 2026 09:50
Copy link

Copilot AI left a comment

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 fixes a compilation error with glibc-2.43 where strchr() now returns a const-qualified pointer when called on a const string, which cannot be assigned to a non-const variable.

Changes:

  • Simplified match_ip() function in lib/noproxy.c by removing the intermediate check variable
  • Direct use of the checkip buffer (non-const) eliminates const qualifier mismatches

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

@bagder bagder closed this in 7dc60bd Jan 25, 2026
@bagder bagder deleted the bagder/noprox-const branch January 25, 2026 10:02
vszakats added a commit that referenced this pull request Jan 25, 2026
Assisted-by: Rudi Heitbaum
Fixes #20420
Follow-up to 7dc60bd #20425
Follow-up to 0e2507a #20421

Closes #20428
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