aboutsummaryrefslogtreecommitdiff
path: root/ports/esp8266
diff options
context:
space:
mode:
authorDamien George2017-10-24 22:39:36 +1100
committerDamien George2017-10-24 22:39:36 +1100
commitf4059dcc0c5251256a53fcb49f56fdda6e879341 (patch)
treea808f552e7ce64740bcb3ba4d584b0ef8d51abd4 /ports/esp8266
parentcfff12612f92d6ae460e9748394a0cedf3b3d31d (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 'ports/esp8266')
-rw-r--r--ports/esp8266/machine_hspi.c2
-rw-r--r--ports/esp8266/machine_wdt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ports/esp8266/machine_hspi.c b/ports/esp8266/machine_hspi.c
index eaabbab7e..9fd0f4868 100644
--- a/ports/esp8266/machine_hspi.c
+++ b/ports/esp8266/machine_hspi.c
@@ -149,7 +149,7 @@ mp_obj_t machine_hspi_make_new(const mp_obj_type_t *type, size_t n_args, size_t
// args[0] holds the id of the peripheral
if (args[0] != MP_OBJ_NEW_SMALL_INT(1)) {
// FlashROM is on SPI0, so far we don't support its usage
- mp_raise_ValueError("");
+ mp_raise_ValueError(NULL);
}
machine_hspi_obj_t *self = m_new_obj(machine_hspi_obj_t);
diff --git a/ports/esp8266/machine_wdt.c b/ports/esp8266/machine_wdt.c
index 04b42782e..4432297fa 100644
--- a/ports/esp8266/machine_wdt.c
+++ b/ports/esp8266/machine_wdt.c
@@ -51,7 +51,7 @@ STATIC mp_obj_t machine_wdt_make_new(const mp_obj_type_t *type_in, size_t n_args
case 0:
return &wdt_default;
default:
- mp_raise_ValueError("");
+ mp_raise_ValueError(NULL);
}
}