diff options
| author | Damien George | 2017-10-24 22:39:36 +1100 |
|---|---|---|
| committer | Damien George | 2017-10-24 22:39:36 +1100 |
| commit | f4059dcc0c5251256a53fcb49f56fdda6e879341 (patch) | |
| tree | a808f552e7ce64740bcb3ba4d584b0ef8d51abd4 /extmod | |
| parent | cfff12612f92d6ae460e9748394a0cedf3b3d31d (diff) | |
all: Use NULL instead of "" when calling mp_raise exception helpers.
This is the established way of doing it and reduces code size by a little
bit.
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/modlwip.c | 2 | ||||
| -rw-r--r-- | extmod/modussl_axtls.c | 2 | ||||
| -rw-r--r-- | extmod/modutimeq.c | 2 | ||||
| -rw-r--r-- | extmod/modwebrepl.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/extmod/modlwip.c b/extmod/modlwip.c index f7e776af9..bbb01b5d7 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -1032,7 +1032,7 @@ STATIC mp_obj_t lwip_socket_sendall(mp_obj_t self_in, mp_obj_t buf_in) { break; } case MOD_NETWORK_SOCK_DGRAM: - mp_raise_NotImplementedError(""); + mp_raise_NotImplementedError(NULL); break; } diff --git a/extmod/modussl_axtls.c b/extmod/modussl_axtls.c index 88a89a23d..719a65cd1 100644 --- a/extmod/modussl_axtls.c +++ b/extmod/modussl_axtls.c @@ -152,7 +152,7 @@ STATIC mp_obj_t socket_setblocking(mp_obj_t self_in, mp_obj_t flag_in) { // Currently supports only blocking mode (void)self_in; if (!mp_obj_is_true(flag_in)) { - mp_raise_NotImplementedError(""); + mp_raise_NotImplementedError(NULL); } return mp_const_none; } diff --git a/extmod/modutimeq.c b/extmod/modutimeq.c index 94cbd20d2..620e7484b 100644 --- a/extmod/modutimeq.c +++ b/extmod/modutimeq.c @@ -146,7 +146,7 @@ STATIC mp_obj_t mod_utimeq_heappop(mp_obj_t heap_in, mp_obj_t list_ref) { } mp_obj_list_t *ret = MP_OBJ_TO_PTR(list_ref); if (!MP_OBJ_IS_TYPE(list_ref, &mp_type_list) || ret->len < 3) { - mp_raise_TypeError(""); + mp_raise_TypeError(NULL); } struct qentry *item = &heap->items[0]; diff --git a/extmod/modwebrepl.c b/extmod/modwebrepl.c index 4ff282aac..3aba5c0f1 100644 --- a/extmod/modwebrepl.c +++ b/extmod/modwebrepl.c @@ -308,7 +308,7 @@ STATIC mp_obj_t webrepl_set_password(mp_obj_t passwd_in) { size_t len; const char *passwd = mp_obj_str_get_data(passwd_in, &len); if (len > sizeof(webrepl_passwd) - 1) { - mp_raise_ValueError(""); + mp_raise_ValueError(NULL); } strcpy(webrepl_passwd, passwd); return mp_const_none; |
