You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/22 18:13:08 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7394: Fix bcmf_netdev.c:705:7: error: 'strnlen' specified bound 2 exceeds source size 1 [-Werror=stringop-overread]

pkarashchenko commented on code in PR #7394:
URL: https://github.com/apache/incubator-nuttx/pull/7394#discussion_r1002549390


##########
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])

Review Comment:
   I think we do not need check for constant as it will be caught at compile time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org