1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

tests/pkg_jsmn: use kernel define ARRAY_SIZE macro

This commit is contained in:
Alexandre Abadie 2019-11-23 15:08:59 +01:00
parent d244b0fe59
commit 9af59196da
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -29,12 +29,9 @@
#include <stdlib.h>
#include <string.h>
#include "kernel_defines.h" /* for ARRAY_SIZE macro */
#include "jsmn.h"
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*a))
#endif
/*
* A small example of jsmn parsing when JSON structure is known and number of
* tokens is predictable.