summaryrefslogtreecommitdiff
path: root/scripts/include/array_size.h
blob: 26ba78d867d160dbb7e8280bfcae5ce511b3429f (plain)
1
2
3
4
5
6
7
8
9
10
11
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARRAY_SIZE_H
#define ARRAY_SIZE_H

/**
 * ARRAY_SIZE - get the number of elements in array @arr
 * @arr: array to be sized
 */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

#endif /* ARRAY_SIZE_H */