Skip to content

Conversation

@andylemin
Copy link
Contributor

Refactors adf_lock_init and adf_lock_free from macros to proper functions to improve static analysis capability and code maintainability.

Adds defensive NULL checks with error logging.

Fixes #2600

@andylemin andylemin requested a review from rdmark as a code owner January 19, 2026 06:57
Refactors adf_lock_init and adf_lock_free from macros to proper functions
to improve static analysis capability and code maintainability.

Adds defensive NULL checks with error logging.

Fixes #2600
@sonarqubecloud
Copy link

Copy link
Member

@rdmark rdmark left a comment

Choose a reason for hiding this comment

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

much cleaner!

one could argue that ad_lock.h has served its purpose and could just as well be refactored away now, but what do you think?

@andylemin
Copy link
Contributor Author

Agreed, I'll add it here.

And yes, the static analyser is working now - it raised some other minor things

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.

refactor macro in ad_lock.h to function

3 participants