Skip to content

macro_early_return#1256

Draft
bharathivelp wants to merge 1 commit into
rdkcentral:developfrom
bharathivelp:fix/macroearly
Draft

macro_early_return#1256
bharathivelp wants to merge 1 commit into
rdkcentral:developfrom
bharathivelp:fix/macroearly

Conversation

@bharathivelp

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 10, 2026 12:39
@bharathivelp
bharathivelp requested a review from a team as a code owner July 10, 2026 12:39
@bharathivelp
bharathivelp marked this pull request as draft July 10, 2026 12:40

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 refactors parts of wifi_decoder.c to accommodate early-return decode macros by moving repetitive JSON decoding blocks into helper functions and introducing a wrapper/impl split for ANQP decoding to centralize cJSON lifetime management.

Changes:

  • Split decode_anqp_object() into a wrapper + decode_anqp_object_impl() so passPointStats is always cleaned up in one place.
  • Extract per-entry decoding into helpers for radio channel stats, neighbor stats, associated device stats, and radio diagnostic stats.
  • Reorder some decoding/allocations to reduce leak risk when decode macros return early.

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

Comment thread source/webconfig/wifi_decoder.c
Comment thread source/webconfig/wifi_decoder.c
Comment thread source/webconfig/wifi_decoder.c
Comment thread source/webconfig/wifi_decoder.c
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