Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2023 11:55:49 GMT
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a672b35811a6 - stable/13 - netlink: Make the writers function table static and const
Message-ID:  <202302181155.31IBtnXl069548@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=a672b35811a67b57cf0fc1bee8d7c5b1785f1bee

commit a672b35811a67b57cf0fc1bee8d7c5b1785f1bee
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-01-17 14:37:21 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-02-18 11:53:54 +0000

    netlink: Make the writers function table static and const
    
    No functional change intended.
    
    Reviewed by:    melifaro
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D38099
    
    (cherry picked from commit e262610007f01398630dc8ce7bf404dbcfd6350c)
---
 sys/netlink/netlink_message_writer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c
index 6573394eb881..0d27d5d0d47c 100644
--- a/sys/netlink/netlink_message_writer.c
+++ b/sys/netlink/netlink_message_writer.c
@@ -368,7 +368,7 @@ nlmsg_write_group_lbuf(struct nl_writer *nw, void *buf, int datalen, int cnt)
 	return (true);
 }
 
-struct nlwriter_ops nlmsg_writers[] = {
+static const struct nlwriter_ops nlmsg_writers[] = {
 	/* NS_WRITER_TYPE_MBUF */
 	{
 		.init = nlmsg_get_ns_mbuf,
@@ -394,7 +394,7 @@ struct nlwriter_ops nlmsg_writers[] = {
 static void
 nlmsg_set_callback(struct nl_writer *nw)
 {
-	struct nlwriter_ops *pops = &nlmsg_writers[nw->writer_type];
+	const struct nlwriter_ops *pops = &nlmsg_writers[nw->writer_type];
 
 	switch (nw->writer_target) {
 	case NS_WRITER_TARGET_SOCKET:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302181155.31IBtnXl069548>