Skip to content

doh: remove superfluous doh_req check#21216

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/doh-check
Closed

doh: remove superfluous doh_req check#21216
bagder wants to merge 1 commit intomasterfrom
bagder/doh-check

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Apr 4, 2026

It has already been checked previously in the function.

Spotted by CodeSonar

It has already been checked previously in the function.

Spotted by CodeSonar
@bagder bagder requested a review from Copilot April 4, 2026 10:59
@github-actions github-actions bot added the name lookup DNS and related tech label Apr 4, 2026
Copy link
Copy Markdown

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 simplifies DoH probe completion handling in lib/doh.c by removing a redundant doh_req-presence check that is already enforced earlier in doh_probe_done(), addressing a static analysis report (CodeSonar) without changing behavior.

Changes:

  • Remove a superfluous DEBUGASSERT(doh_req || result) and if(doh_req) guard in doh_probe_done().
  • Keep response-body extraction conditional only on !result, while always removing the probe metadata afterward.

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

@bagder bagder closed this in 741ee57 Apr 4, 2026
@bagder bagder deleted the bagder/doh-check branch April 4, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

name lookup DNS and related tech

Development

Successfully merging this pull request may close these issues.

2 participants