Skip to content

Comments

Sync changes from develop branch#35

Closed
SanthoshGujulvajagadeesh wants to merge 6 commits intofeature/network_intelligencefrom
develop
Closed

Sync changes from develop branch#35
SanthoshGujulvajagadeesh wants to merge 6 commits intofeature/network_intelligencefrom
develop

Conversation

@SanthoshGujulvajagadeesh
Copy link
Contributor

No description provided.

Copy link
Contributor

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 syncs changes from the develop branch, primarily addressing Coverity issues (RDKB-61956, RDKB-62450) with various code quality and reliability improvements.

Key changes:

  • Improved error handling and resource management with proper cleanup on allocation failures
  • Enhanced thread safety with mutex protection for shared variables
  • Added debug logging for eventfd read operations to improve troubleshooting

Reviewed changes

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

File Description
source/AdvSecurityDml/cujoagent_dcl_api.c Added debug logging for read operations, improved resource cleanup in error paths, and fixed radio index initialization
source/AdvSecurityDml/cosa_adv_security_internal.c Refactored memory allocation error handling with centralized cleanup, added mutex protection for logging period variable, fixed condition variable usage pattern, and improved snprintf return value checking
source/AdvSecurityDml/cosa_adv_security_dml.c Added mutex protection for shared variable access and corrected return values from ANSC_STATUS to BOOL
CHANGELOG.md Updated with version 1.1.2 release notes documenting the Coverity fixes and other recent changes

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

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment on lines +1262 to +1264
else {
CcspTraceDebug(("Read event fd %d bytes\n", nbytes));
}
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: This else block uses spaces for indentation while the rest of the file appears to use proper indentation. The lines should be indented with the same style as the surrounding code.

Suggested change
else {
CcspTraceDebug(("Read event fd %d bytes\n", nbytes));
}
else {
CcspTraceDebug(("Read event fd %d bytes\n", nbytes));
}

Copilot uses AI. Check for mistakes.
}

if (syscfg_init() != 0) {
CcspTraceError(("%s: syscfg_init error", __FUNCTION__));
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing cleanup on syscfg_init failure: If syscfg_init() fails, the error is logged but the function continues and returns the allocated object. This could lead to using a partially initialized object. Consider either calling FreeCosaDmAgent(pMyObject) and returning NULL on failure, or document why it's safe to continue despite this failure.

Suggested change
CcspTraceError(("%s: syscfg_init error", __FUNCTION__));
CcspTraceError(("%s: syscfg_init error", __FUNCTION__));
FreeCosaDmAgent(pMyObject);
return (ANSC_HANDLE)NULL;

Copilot uses AI. Check for mistakes.
continue;
}
else {
CcspTraceDebug(("Read eventfd %d bytes\n", nbytes));
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: This else block uses spaces for indentation while the rest of the file appears to use proper indentation. The lines should be indented with the same style as the surrounding code.

Suggested change
CcspTraceDebug(("Read eventfd %d bytes\n", nbytes));
CcspTraceDebug(("Read eventfd %d bytes\n", nbytes));

Copilot uses AI. Check for mistakes.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants