Skip to content

Fix inconsistent indentation in Device_WiFi_SSID.cpp interface-parsing block - #401

Merged
Vismalskumar0 merged 2 commits into
feature/RDKEMW-14686_finalfrom
copilot/sub-pr-399-again
Mar 12, 2026
Merged

Fix inconsistent indentation in Device_WiFi_SSID.cpp interface-parsing block#401
Vismalskumar0 merged 2 commits into
feature/RDKEMW-14686_finalfrom
copilot/sub-pr-399-again

Conversation

Copilot AI commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

The interface-parsing block in Device_WiFi_SSID.cpp (~lines 277–340) mixed tabs and spaces with misaligned nesting levels, making the control flow hard to follow and error-prone to modify.

Changes

  • Uniform indentation: replaced all mixed tab/space indentation with consistent 4-space indentation throughout the block
  • Allman-style braces: moved opening braces for for and inner if blocks onto their own lines, matching the surrounding code style
  • Nesting clarity: each level (if (!cJSON_IsArray), for (...), inner if (!cJSON_IsObject), if (strcmp(...WIFI...)), post-loop checks) is now visually distinct

Before:

cJSON *interfaces = cJSON_GetObjectItem(jsonObj, "interfaces");
	            cJSON *interface = NULL; 
		    cJSON *interfaceType = NULL;

            if (!cJSON_IsArray(interfaces))
            {
                ...
            }

             for (int i = 0; i < cJSON_GetArraySize(interfaces); i++) {
                        interface = cJSON_GetArrayItem(interfaces, i);
            if (!cJSON_IsObject(interface)) {

After:

                    cJSON *interfaces = cJSON_GetObjectItem(jsonObj, "interfaces");
                    cJSON *interface = NULL;
                    cJSON *interfaceType = NULL;

                    if (!cJSON_IsArray(interfaces))
                    {
                        ...
                    }

                    for (int i = 0; i < cJSON_GetArraySize(interfaces); i++)
                    {
                        interface = cJSON_GetArrayItem(interfaces, i);
                        if (!cJSON_IsObject(interface))
                        {

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on Device_WiFi_SSID.cpp updates Fix inconsistent indentation in Device_WiFi_SSID.cpp interface-parsing block Mar 12, 2026
@Vismalskumar0
Vismalskumar0 marked this pull request as ready for review March 12, 2026 09:44
@Vismalskumar0
Vismalskumar0 requested a review from a team as a code owner March 12, 2026 09:44
Copilot AI review requested due to automatic review settings March 12, 2026 09:44
@Vismalskumar0
Vismalskumar0 merged commit 1d45233 into feature/RDKEMW-14686_final Mar 12, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 12, 2026
Copilot AI removed the request for review from Copilot March 23, 2026 22:43
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