testing/sensortest: fix bug because of adding custom type
Change-Id: I69fc7881e3fa7f94b549b1a342339fe5a9ec13ab Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
eff52fefcf
commit
89376af38d
@ -36,6 +36,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#define ARRAYSIZE(a) (sizeof(a) / sizeof(a)[0])
|
||||||
#define DEVNAME_FMT "/dev/sensor/%s"
|
#define DEVNAME_FMT "/dev/sensor/%s"
|
||||||
#define DEVNAME_MAX 64
|
#define DEVNAME_MAX 64
|
||||||
|
|
||||||
@ -201,7 +202,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
g_should_exit = false;
|
g_should_exit = false;
|
||||||
name = argv[1];
|
name = argv[1];
|
||||||
for (idx = 0; idx < SENSOR_TYPE_COUNT; idx++)
|
for (idx = 0; idx < ARRAYSIZE(g_sensor_info); idx++)
|
||||||
{
|
{
|
||||||
if (!strncmp(name, g_sensor_info[idx].name,
|
if (!strncmp(name, g_sensor_info[idx].name,
|
||||||
strlen(g_sensor_info[idx].name)))
|
strlen(g_sensor_info[idx].name)))
|
||||||
|
Loading…
Reference in New Issue
Block a user