| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Coverity CID 503493 (DEADCODE): in send_curl_request(), the failure path of curl_slist_append() called curl_slist_free_all() through `if(headers)` -- but `headers` is initialized to NULL on entry and only assigned after the append succeeds. The condition can never be true and the free is unreachable. Drop the dead block. The remaining cleanup (curl_easy_cleanup, can_retry=false, return false) is unchanged and correct.
Sonar c:S1763: the `default:` case of the WndProc switch ended with `return DefWindowProc(...);` followed by `break;`. The break was unreachable. Remove the dead line.
|
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 Coverity/Sonar audit cleanup series by removing two unreachable code paths in the claim UI and claim API request code.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/claim/ui.c | Deletes unreachable break in WndProc() default case. |
| src/claim/claim-with-api.c | Deletes unreachable header-list cleanup on curl_slist_append() failure when headers cannot yet be non-NULL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
* claim: drop unreachable curl_slist cleanup on append failure Coverity CID 503493 (DEADCODE): in send_curl_request(), the failure path of curl_slist_append() called curl_slist_free_all() through `if(headers)` -- but `headers` is initialized to NULL on entry and only assigned after the append succeeds. The condition can never be true and the free is unreachable. Drop the dead block. The remaining cleanup (curl_easy_cleanup, can_retry=false, return false) is unchanged and correct. * claim: drop unreachable break in WndProc default case Sonar c:S1763: the `default:` case of the WndProc switch ended with `return DefWindowProc(...);` followed by `break;`. The break was unreachable. Remove the dead line. --------- Co-authored-by: Costa Tsaousis <costa@netdata.cloud> (cherry picked from commit 7b6fddb)
| Back | FazBrowse Home | New Git URL |
Summary