From 85deafd7bf169fd00f71ddc045c4e6d5089ef66e Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 22 Oct 2022 19:36:15 +0800 Subject: [PATCH] Fix bcmf_netdev.c:705:7: error: 'strnlen' specified bound 2 exceeds source size 1 [-Werror=stringop-overread] Signed-off-by: Xiang Xiao --- drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c index d5b72f81af..7ab7f83898 100644 --- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c +++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c @@ -702,7 +702,7 @@ static int bcmf_ifup(FAR struct net_driver_s *dev) goto errout_in_wl_active; } - if (strnlen(CONFIG_IEEE80211_BROADCOM_DEFAULT_COUNTRY, 2) == 2) + if (CONFIG_IEEE80211_BROADCOM_DEFAULT_COUNTRY[0]) { bcmf_wl_set_country_code(priv, CHIP_STA_INTERFACE, CONFIG_IEEE80211_BROADCOM_DEFAULT_COUNTRY);