Skip to content

RDKB-64347: Fixing coverity issues#1220

Open
bharathivelp wants to merge 1 commit into
rdkcentral:developfrom
bharathivelp:coverity_low
Open

RDKB-64347: Fixing coverity issues#1220
bharathivelp wants to merge 1 commit into
rdkcentral:developfrom
bharathivelp:coverity_low

Conversation

@bharathivelp

Copy link
Copy Markdown
Contributor

Reason for change: Fixing Low priority Coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.
 
Risks: Low
Priority: P1
Signed-off-by: Velpula_Bharathi@comcast.com

Reason for change: Fixing Low priority Coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.
 
Risks: Low
Priority: P1
Signed-off-by: Velpula_Bharathi@comcast.com
Copilot AI review requested due to automatic review settings June 23, 2026 06:50
@bharathivelp bharathivelp requested a review from a team as a code owner June 23, 2026 06:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 addresses low-priority Coverity findings by removing a nested helper function from a handler and eliminating a local-variable shadowing case in the tree rotation code.

Changes:

  • Hoisted to_sta_key() out of wifiapi_handle_get_ApAssocDeviceDiagnosticResult() into a file-scope static helper.
  • Renamed a shadowing local variable in ds_bst_rotate() (dirpdir) to avoid confusion/static-analysis warnings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
source/core/wifi_ctrl_wifiapi_handlers.c Moves to_sta_key() to file scope; handler continues to format associated-device diagnostic output.
lib/ds/ds_tree.c Renames a shadowing local variable in the BST rotate helper.

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

Comment on lines +58 to +63
static char* to_sta_key(uint8_t *mac_address, sta_key_t sta_key) {
snprintf(sta_key, STA_KEY_LEN, "%02x:%02x:%02x:%02x:%02x:%02x",
mac_address[0], mac_address[1], mac_address[2],
mac_address[3], mac_address[4], mac_address[5]);
return sta_key;
}
Comment on lines 634 to 636
snprintf(result_buf, result_buf_size, "diag result: number of devs: %d\n", num_devs);
for (unsigned int i = 0; i < num_devs; i++) {
snprintf(result_buf, result_buf_size,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants