Skip to content

Commit faefdc7

Browse files
maosqlRbb666
authored andcommitted
fix: with mismatched bound [-Warray-parameter=].
1 parent ea5a974 commit faefdc7

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

components/drivers/wlan/dev_wlan_mgnt.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,10 +1132,16 @@ rt_bool_t rt_wlan_is_ready(void)
11321132
return _ready;
11331133
}
11341134

1135-
rt_err_t rt_wlan_set_mac(rt_uint8_t mac[6])
1135+
rt_err_t rt_wlan_set_mac(rt_uint8_t *mac)
11361136
{
11371137
rt_err_t err = RT_EOK;
11381138

1139+
if (mac == RT_NULL)
1140+
{
1141+
RT_WLAN_LOG_E("mac addr is null");
1142+
return -RT_EINVAL;
1143+
}
1144+
11391145
if (_sta_is_null())
11401146
{
11411147
return -RT_EIO;
@@ -1155,10 +1161,16 @@ rt_err_t rt_wlan_set_mac(rt_uint8_t mac[6])
11551161
return err;
11561162
}
11571163

1158-
rt_err_t rt_wlan_get_mac(rt_uint8_t mac[6])
1164+
rt_err_t rt_wlan_get_mac(rt_uint8_t *mac)
11591165
{
11601166
rt_err_t err = RT_EOK;
11611167

1168+
if (mac == RT_NULL)
1169+
{
1170+
RT_WLAN_LOG_E("mac addr is null");
1171+
return -RT_EINVAL;
1172+
}
1173+
11621174
if (_sta_is_null())
11631175
{
11641176
return -RT_EIO;

0 commit comments

Comments
 (0)