mirror of
https://github.com/espressif/openthread.git
synced 2026-09-18 23:20:08 +00:00
[code-utils] adding helper macro OT_ARRAY_LENGTH() (#2743)
This commit adds helper macro `OT_ARRAY_LENGTH()` to get the number of elements in an array.
This commit is contained in:
committed by
Jonathan Hui
parent
ae7984d3a7
commit
2abd7a2822
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "test_platform.h"
|
||||
|
||||
#include "common/code_utils.hpp"
|
||||
#include "common/debug.hpp"
|
||||
#include "common/instance.hpp"
|
||||
#include "common/timer.hpp"
|
||||
@@ -550,7 +551,7 @@ int TestTenTimers(void)
|
||||
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < sizeof(kTimeShift) / sizeof(kTimeShift[0]); i++)
|
||||
for (i = 0; i < OT_ARRAY_LENGTH(kTimeShift); i++)
|
||||
{
|
||||
TenTimers(kTimeShift[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user