summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/network_esp_hosted.c
diff options
context:
space:
mode:
authorJon Foster <jon@jon-foster.co.uk>2024-04-01 19:23:49 +0100
committerDamien George <damien@micropython.org>2024-07-04 15:55:03 +1000
commit92484d8822635c125a7648d5b056ff7f78d62ab3 (patch)
tree34f8731d56f4330fe0e8a0ca325cdedd8e2eaa8a /extmod/network_esp_hosted.c
parent289b2dd87960a4cdf019013cecd489f0d0cabc26 (diff)
downloadmicropython-92484d8822635c125a7648d5b056ff7f78d62ab3.tar.gz
micropython-92484d8822635c125a7648d5b056ff7f78d62ab3.zip
all: Use new mp_obj_new_str_from_cstr() function.
Use new function mp_obj_new_str_from_cstr() where appropriate. It simplifies the code, and makes it smaller too. Signed-off-by: Jon Foster <jon@jon-foster.co.uk>
Diffstat (limited to 'extmod/network_esp_hosted.c')
-rw-r--r--extmod/network_esp_hosted.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/network_esp_hosted.c b/extmod/network_esp_hosted.c
index 0747343d87..04cfc36b32 100644
--- a/extmod/network_esp_hosted.c
+++ b/extmod/network_esp_hosted.c
@@ -230,7 +230,7 @@ static mp_obj_t network_esp_hosted_config(size_t n_args, const mp_obj_t *args, m
case MP_QSTR_essid: {
esp_hosted_netinfo_t netinfo;
esp_hosted_wifi_netinfo(&netinfo);
- return mp_obj_new_str(netinfo.ssid, strlen(netinfo.ssid));
+ return mp_obj_new_str_from_cstr(netinfo.ssid);
}
case MP_QSTR_security: {
esp_hosted_netinfo_t netinfo;