diff options
| author | Damien George <damien.p.george@gmail.com> | 2019-05-13 12:39:03 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2019-05-13 12:39:03 +1000 |
| commit | 8586afa6f592cd8b886d5df04f587d1a92ad1bfc (patch) | |
| tree | 168bcae753dc0b298203728a42a0c574e4cf5e27 | |
| parent | ab93321e3160f2b688e8a60ad224debbdbd68c66 (diff) | |
esp32/modnetwork: Change type to size_t for uses of mp_obj_str_get_data.
| -rw-r--r-- | ports/esp32/modnetwork.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/esp32/modnetwork.c b/ports/esp32/modnetwork.c index 5d3c19b80..b93715b6e 100644 --- a/ports/esp32/modnetwork.c +++ b/ports/esp32/modnetwork.c @@ -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); |
