diff options
author | 2024-09-20 01:24:24 -0700 | |
---|---|---|
committer | 2024-09-20 01:24:24 -0700 | |
commit | 36ec807b627b4c0a0a382f0ae48eac7187d14b2b (patch) | |
tree | df9d682d66492722dbd186bd01af2d7334ea408a /scripts/include/array_size.h | |
parent | Input: adp5588-keys - fix check on return code (diff) | |
parent | Input: Convert comma to semicolon (diff) | |
download | wireguard-linux-36ec807b627b4c0a0a382f0ae48eac7187d14b2b.tar.xz wireguard-linux-36ec807b627b4c0a0a382f0ae48eac7187d14b2b.zip |
Merge branch 'next' into for-linus
Prepare input updates for 6.12 merge window.
Diffstat (limited to 'scripts/include/array_size.h')
-rw-r--r-- | scripts/include/array_size.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/include/array_size.h b/scripts/include/array_size.h new file mode 100644 index 000000000000..26ba78d867d1 --- /dev/null +++ b/scripts/include/array_size.h @@ -0,0 +1,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 */ |