mirror of
https://github.com/apache/nuttx.git
synced 2026-09-24 00:42:03 +08:00
esp32s3: Use PANIC() instead of assert(0)
Considering kernel code, it's reasonable to use `PANIC()` instead of `assert(0)` to handle with situations that require abort. Unlike `assert`, `PANIC()` doesn't dependent on `NDEBUG`.
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
6f235c5f0a
commit
281ab83309
@@ -2317,7 +2317,7 @@ int esp32s3_bt_controller_init(void)
|
||||
else
|
||||
{
|
||||
wlerr("Internal 150kHz RC oscillator not detected.");
|
||||
assert(0);
|
||||
PANIC();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -802,7 +802,7 @@ static void esp_set_isr(int32_t n, void *f, void *arg)
|
||||
if (!adapter)
|
||||
{
|
||||
wlerr("Failed to alloc %d memory\n", tmp);
|
||||
assert(0);
|
||||
PANIC();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ static void esp_set_isr(int32_t n, void *f, void *arg)
|
||||
if (ret)
|
||||
{
|
||||
wlerr("Failed to attach IRQ %d\n", irq);
|
||||
assert(0);
|
||||
PANIC();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -821,7 +821,7 @@ static void esp_set_isr(int32_t n, void *f, void *arg)
|
||||
if (ret)
|
||||
{
|
||||
wlerr("Failed to attach IRQ %d\n", irq);
|
||||
assert(0);
|
||||
PANIC();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user