| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sonar c:S3923: mcp_query_interrupt_callback() had a null guard (`if (!int_data || !int_data->mcpc) return false;`) followed by an unconditional `return false`. Both branches returned the same value and no field of int_data was ever dereferenced, so the guard was dead code. Remove the conditional, mark `data` unused with `(void)data;`, and keep the callback as an explicit "no interrupt" stub. The trailing comment about future client-disconnect/timeout detection is preserved.
|
Sorry, something went wrong.
|
@cubic-dev-ai review this PR |
Sorry, something went wrong.
@stelfrag I have started the AI code review. It will take a few minutes to complete. |
Sorry, something went wrong.
There was a problem hiding this comment.
Continues the audit-driven cleanup series by addressing a static-analysis finding in the MCP metrics query tool, simplifying an unused interrupt callback parameter handling.
Changes:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
mcp: drop redundant null guard from interrupt-callback stub Sonar c:S3923: mcp_query_interrupt_callback() had a null guard (`if (!int_data || !int_data->mcpc) return false;`) followed by an unconditional `return false`. Both branches returned the same value and no field of int_data was ever dereferenced, so the guard was dead code. Remove the conditional, mark `data` unused with `(void)data;`, and keep the callback as an explicit "no interrupt" stub. The trailing comment about future client-disconnect/timeout detection is preserved. Co-authored-by: Costa Tsaousis <costa@netdata.cloud> (cherry picked from commit 5b05083)
| Back | FazBrowse Home | New Git URL |
Summary