diff options
author | Shuah Khan <skhan@linuxfoundation.org> | 2021-12-09 14:10:23 -0700 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2021-12-10 17:50:57 -0700 |
commit | 1329e40ebd18f1171f89f9e61b7a4aed9a1de406 (patch) | |
tree | bf935093f212c433ba57c68c5809d87e55d495fe /tools/testing/selftests/net/tcp_fastopen_backup_key.c | |
parent | 5a69d33b3ed62f6c1eb7ad3b9c350d29f49513e8 (diff) | |
download | linux-1329e40ebd18f1171f89f9e61b7a4aed9a1de406.tar.bz2 |
selftests/net: remove ARRAY_SIZE define from individual tests
ARRAY_SIZE is defined in several selftests. Remove definitions from
individual test files and include header file for the define instead.
ARRAY_SIZE define is added in a separate patch to prepare for this
change.
Remove ARRAY_SIZE from net tests and pickup the one defined in
kselftest.h.
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/net/tcp_fastopen_backup_key.c')
-rw-r--r-- | tools/testing/selftests/net/tcp_fastopen_backup_key.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/testing/selftests/net/tcp_fastopen_backup_key.c b/tools/testing/selftests/net/tcp_fastopen_backup_key.c index 9c55ec44fc43..c1cb0c75156a 100644 --- a/tools/testing/selftests/net/tcp_fastopen_backup_key.c +++ b/tools/testing/selftests/net/tcp_fastopen_backup_key.c @@ -26,6 +26,8 @@ #include <fcntl.h> #include <time.h> +#include "../kselftest.h" + #ifndef TCP_FASTOPEN_KEY #define TCP_FASTOPEN_KEY 33 #endif @@ -34,10 +36,6 @@ #define PROC_FASTOPEN_KEY "/proc/sys/net/ipv4/tcp_fastopen_key" #define KEY_LENGTH 16 -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) -#endif - static bool do_ipv6; static bool do_sockopt; static bool do_rotate; |