[rdkb][common][hal][Refactor getRadioChannelsInUse]
[Description]
Fix wrong if condition.
[Release-log]
N/A
Change-Id: Id9310ae486c99787a861b9c80ec5a5cac679e9a3
diff --git a/src/wifi/wifi_hal.c b/src/wifi/wifi_hal.c
index f141d60..ff1a4f8 100644
--- a/src/wifi/wifi_hal.c
+++ b/src/wifi/wifi_hal.c
@@ -2243,9 +2243,9 @@
memset(buf, 0, sizeof(buf));
wifi_halgetRadioExtChannel(config_file, buf); // read ht_capab for HT40+ or -
- if (strncmp(buf, "AboveControlChannel", strlen("AboveControlChannel") == 0) && channel < 10) {
+ if (strncmp(buf, "AboveControlChannel", strlen("AboveControlChannel")) == 0 && channel < 10) {
snprintf(output_string, 256, "%d,%d", channel, channel+4);
- } else if (strncmp(buf, "BelowControlChannel", strlen("BelowControlChannel") == 0) && channel > 4) {
+ } else if (strncmp(buf, "BelowControlChannel", strlen("BelowControlChannel")) == 0 && channel > 4) {
snprintf(output_string, 256, "%d,%d", channel-4, channel);
} else {
fprintf(stderr, "%s: invalid channel %d set with %s\n.", __func__, channel, buf);