File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
ports/esp32s2/common-hal/wifi Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -56,34 +56,34 @@ mp_obj_t common_hal_wifi_network_get_country(wifi_network_obj_t *self) {
56
56
}
57
57
58
58
mp_obj_t common_hal_wifi_network_get_authmode (wifi_network_obj_t * self ) {
59
- char authmode [ 16 ] ;
59
+ const char * authmode = "" ;
60
60
switch (self -> record .authmode ) {
61
61
case WIFI_AUTH_OPEN :
62
- strcpy ( authmode , "OPEN" ) ;
62
+ authmode = "OPEN" ;
63
63
break ;
64
64
case WIFI_AUTH_WEP :
65
- strcpy ( authmode , "WEP" ) ;
65
+ authmode = "WEP" ;
66
66
break ;
67
67
case WIFI_AUTH_WPA_PSK :
68
- strcpy ( authmode , "WPA_PSK" ) ;
68
+ authmode = "WPA_PSK" ;
69
69
break ;
70
70
case WIFI_AUTH_WPA2_PSK :
71
- strcpy ( authmode , "WPA2_PSK" ) ;
71
+ authmode = "WPA2_PSK" ;
72
72
break ;
73
73
case WIFI_AUTH_WPA_WPA2_PSK :
74
- strcpy ( authmode , "WPA_WPA2_PSK" ) ;
74
+ authmode = "WPA_WPA2_PSK" ;
75
75
break ;
76
76
case WIFI_AUTH_WPA2_ENTERPRISE :
77
- strcpy ( authmode , "WPA2_ENTERPRISE" ) ;
77
+ authmode = "WPA2_ENTERPRISE" ;
78
78
break ;
79
79
case WIFI_AUTH_WPA3_PSK :
80
- strcpy ( authmode , "WPA3_PSK" ) ;
80
+ authmode = "WPA3_PSK" ;
81
81
break ;
82
82
case WIFI_AUTH_WPA2_WPA3_PSK :
83
- strcpy ( authmode , "WPA2_WPA3_PSK" ) ;
83
+ authmode = "WPA2_WPA3_PSK" ;
84
84
break ;
85
85
default :
86
- strcpy ( authmode , "UNKNOWN" ) ;
86
+ authmode = "UNKNOWN" ;
87
87
break ;
88
88
}
89
89
const char * cstr = (const char * ) authmode ;
You can’t perform that action at this time.
0 commit comments