From: Max Kellermann Date: Mon, 18 Nov 2024 11:35:30 +0000 (+0100) Subject: lsfd-cmd: make pointer arrays const X-Git-Tag: v2.42-start~145^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=509439572e9cfae4b4483f46669b2a6566dceb35;p=thirdparty%2Futil-linux.git lsfd-cmd: make pointer arrays const --- diff --git a/lsfd-cmd/cdev.c b/lsfd-cmd/cdev.c index 2bb7b7465..3319479ae 100644 --- a/lsfd-cmd/cdev.c +++ b/lsfd-cmd/cdev.c @@ -649,7 +649,7 @@ static struct cdev_ops cdev_tty_ops = { .get_ipc_class = cdev_tty_get_ipc_class, }; -static const struct cdev_ops *cdev_ops[] = { +static const struct cdev_ops *const cdev_ops[] = { &cdev_tun_ops, &cdev_misc_ops, &cdev_tty_ops, diff --git a/lsfd-cmd/unkn.c b/lsfd-cmd/unkn.c index 5338d8cec..b1883bf34 100644 --- a/lsfd-cmd/unkn.c +++ b/lsfd-cmd/unkn.c @@ -939,7 +939,7 @@ static const struct anon_ops anon_inotify_ops = { * Generally, we use "-" as the word separators in lsfd's output. * However, about bpf*, we use "_" because bpftool uses "_". */ -static const char *bpf_prog_type_table[] = { +static const char *const bpf_prog_type_table[] = { [0] = "unspec", /* BPF_PROG_TYPE_UNSPEC*/ [1] = "socket_filter", /* BPF_PROG_TYPE_SOCKET_FILTER*/ [2] = "kprobe", /* BPF_PROG_TYPE_KPROBE*/ @@ -1139,7 +1139,7 @@ static const struct anon_ops anon_bpf_prog_ops = { /* * bpf-map */ -static const char *bpf_map_type_table[] = { +static const char *const bpf_map_type_table[] = { [0] = "unspec", /* BPF_MAP_TYPE_UNSPEC */ [1] = "hash", /* BPF_MAP_TYPE_HASH */ [2] = "array", /* BPF_MAP_TYPE_ARRAY */ @@ -1332,7 +1332,7 @@ static const struct anon_ops anon_generic_ops = { .handle_fdinfo = NULL, }; -static const struct anon_ops *anon_ops[] = { +static const struct anon_ops *const anon_ops[] = { &anon_pidfd_ops, &anon_eventfd_ops, &anon_eventpoll_ops,