]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd-cmd: make pointer arrays const
authorMax Kellermann <max.kellermann@gmail.com>
Mon, 18 Nov 2024 11:35:30 +0000 (12:35 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Mon, 18 Nov 2024 11:36:07 +0000 (12:36 +0100)
lsfd-cmd/cdev.c
lsfd-cmd/unkn.c

index 2bb7b7465743a03c565bc5d15e1e89ff2532f0ea..3319479ae7b143cbdf0fe1afcf05a987c40d792f 100644 (file)
@@ -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,
index 5338d8cec85683d49109662272d4b2934b8e5e6c..b1883bf34c8c69715cc99db93a720d60862fddf0 100644 (file)
@@ -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,