diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2021-10-21 15:28:24 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-11-08 08:00:00 +0000 |
commit | 951b965278240b19545798f482da6120e44c04e3 (patch) | |
tree | 70ecbd2efe28612ae0f381722047a5eaec48d96b /tests/nlattr_ifla_linkinfo.c | |
parent | 17601b4927bfcaae0429f70db665a95d93f425cd (diff) | |
download | strace-951b965278240b19545798f482da6120e44c04e3.tar.gz |
tests/nlattr_ifla_linkinfo.c: constify unsupported_*_types
There is no need them to be non-constant.
* tests/nlattr_ifla_linkinfo.c (TEST_UNKNOWN_TUNNELS) <arrstrs,
arrstrs_pos, arrstr>: Add const qualifier.
(main) <unsupported_tunnel_types, unsupported_xstats_types,
unsupported_data_types>: Likewise.
Diffstat (limited to 'tests/nlattr_ifla_linkinfo.c')
-rw-r--r-- | tests/nlattr_ifla_linkinfo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/nlattr_ifla_linkinfo.c b/tests/nlattr_ifla_linkinfo.c index 3a240d755..f125e46a4 100644 --- a/tests/nlattr_ifla_linkinfo.c +++ b/tests/nlattr_ifla_linkinfo.c @@ -35,9 +35,9 @@ do { \ /* 64 is guestimate for maximum unknown type len */ \ char buf[8 * 2 + 64 + objsz_]; \ - const char **arrstrs[] = arrstrs_; \ - const char ***arrstrs_pos = arrstrs; \ - const char **arrstr = *arrstrs_pos; \ + const char *const *arrstrs[] = arrstrs_; \ + const char *const **arrstrs_pos = arrstrs; \ + const char *const *arrstr = *arrstrs_pos; \ \ for (const char *type = arrstr ? arrstr[0] : NULL; \ type && arrstr; \ @@ -241,7 +241,7 @@ int main(void) { static const uint8_t unknown_msg[] = { 0xab, 0xac, 0xdb, 0xcd }; - static const char *unsupported_tunnel_types[] = { + static const char *const unsupported_tunnel_types[] = { "batadv", "bareudp", "bond", "caif", "cfhsi", "dummy", @@ -264,12 +264,12 @@ main(void) "xfrm", NULL }; - static const char *unsupported_xstats_types[] = { + static const char *const unsupported_xstats_types[] = { "bridge", "tun", NULL }; - static const char *unsupported_data_types[] = { + static const char *const unsupported_data_types[] = { "can", NULL }; |