Update ports/esp32s2/common-hal/wifi/Network.c

Avoid to use yet another variable.

Co-authored-by: Scott Shawcroft <scott@tannewt.org>
This commit is contained in:
BennyE 2021-01-10 17:18:43 +01:00 committed by GitHub
parent 115f3e0867
commit 53e4d78a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,5 @@ mp_obj_t common_hal_wifi_network_get_authmode(wifi_network_obj_t *self) {
authmode = "UNKNOWN";
break;
}
const char* cstr = (const char*) authmode;
return mp_obj_new_str(cstr, strlen(cstr));
return mp_obj_new_str(authmode, strlen(authmode));
}