Skip to content
Snippets Groups Projects
Commit 8586afa6 authored by Damien George's avatar Damien George
Browse files

esp32/modnetwork: Change type to size_t for uses of mp_obj_str_get_data.

parent ab93321e
No related branches found
No related tags found
No related merge requests found
......@@ -312,7 +312,7 @@ STATIC mp_obj_t esp_connect(size_t n_args, const mp_obj_t *pos_args, mp_map_t *k
// configure any parameters that are given
if (n_args > 1) {
mp_uint_t len;
size_t len;
const char *p;
if (args[ARG_ssid].u_obj != mp_const_none) {
p = mp_obj_str_get_data(args[ARG_ssid].u_obj, &len);
......@@ -553,7 +553,7 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
}
case QS(MP_QSTR_essid): {
req_if = WIFI_IF_AP;
mp_uint_t len;
size_t len;
const char *s = mp_obj_str_get_data(kwargs->table[i].value, &len);
len = MIN(len, sizeof(cfg.ap.ssid));
memcpy(cfg.ap.ssid, s, len);
......@@ -572,7 +572,7 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
}
case QS(MP_QSTR_password): {
req_if = WIFI_IF_AP;
mp_uint_t len;
size_t len;
const char *s = mp_obj_str_get_data(kwargs->table[i].value, &len);
len = MIN(len, sizeof(cfg.ap.password) - 1);
memcpy(cfg.ap.password, s, len);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment