From: bluhm Date: Sun, 30 May 2021 21:01:27 +0000 (+0000) Subject: Declare all struct protosw as constant. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b688c8f8c02a9f48cb1994982f842941ebaf8271;p=openbsd Declare all struct protosw as constant. OK mvs@ --- diff --git a/sys/kern/uipc_proto.c b/sys/kern/uipc_proto.c index 2c29eb37e5e..8ec85a32169 100644 --- a/sys/kern/uipc_proto.c +++ b/sys/kern/uipc_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_proto.c,v 1.19 2021/05/25 22:45:09 bluhm Exp $ */ +/* $OpenBSD: uipc_proto.c,v 1.20 2021/05/30 21:01:27 bluhm Exp $ */ /* $NetBSD: uipc_proto.c,v 1.8 1996/02/13 21:10:47 christos Exp $ */ /*- @@ -44,7 +44,7 @@ * Definitions of protocols supported in the UNIX domain. */ -struct protosw unixsw[] = { +const struct protosw unixsw[] = { { .pr_type = SOCK_STREAM, .pr_domain = &unixdomain, diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index 0152df93eda..c7c09f6fec0 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.c,v 1.214 2021/05/26 08:28:34 mvs Exp $ */ +/* $OpenBSD: pfkeyv2.c,v 1.215 2021/05/30 21:01:27 bluhm Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -200,7 +200,7 @@ pfdatatopacket(void *data, int len, struct mbuf **packet) return (0); } -static struct protosw pfkeysw[] = { +const struct protosw pfkeysw[] = { { .pr_type = SOCK_RAW, .pr_domain = &pfkeydomain, diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index cd7c3490964..2b6d4e92faf 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.316 2021/05/25 22:45:09 bluhm Exp $ */ +/* $OpenBSD: rtsock.c,v 1.317 2021/05/30 21:01:27 bluhm Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -2356,7 +2356,7 @@ rt_setsource(unsigned int rtableid, struct sockaddr *src) * Definitions of protocols supported in the ROUTE domain. */ -struct protosw routesw[] = { +const struct protosw routesw[] = { { .pr_type = SOCK_RAW, .pr_domain = &routedomain,