Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Sep 2022 23:44:07 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 64cce803c479 - main - Correct IPv6 MLD group state string table
Message-ID:  <YyjUl0FtTgJ3v05W@kib.kiev.ua>
In-Reply-To: <202209191302.28JD20mt050633@gitrepo.freebsd.org>
References:  <202209191302.28JD20mt050633@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 19, 2022 at 01:02:00PM +0000, Ed Maste wrote:
> The branch main has been updated by emaste:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=64cce803c479068b93560644c8fc8f02c579524f
> 
> commit 64cce803c479068b93560644c8fc8f02c579524f
> Author:     Sébastien BINI <sebastien.bini@stormshield.eu>
> AuthorDate: 2022-09-16 13:58:52 +0000
> Commit:     Ed Maste <emaste@FreeBSD.org>
> CommitDate: 2022-09-19 13:01:36 +0000
> 
>     Correct IPv6 MLD group state string table
>     
>     MLD_REPORTING_MEMBER was missing
>     
>     MFC after:      1 week
>     Differential Revision:  https://reviews.freebsd.org/D36311
> ---
>  sys/netinet6/in6_mcast.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
> index a02e18656dc2..0cc8971d60d3 100644
> --- a/sys/netinet6/in6_mcast.c
> +++ b/sys/netinet6/in6_mcast.c
> @@ -2854,6 +2854,7 @@ in6m_mode_str(const int mode)
>  static const char *in6m_statestrs[] = {
>  	"not-member",
>  	"silent",
> +	"reporting",
>  	"idle",
>  	"lazy",
>  	"sleeping",
> @@ -2862,6 +2863,8 @@ static const char *in6m_statestrs[] = {
>  	"sg-query-pending",
>  	"leaving"
>  };
> +_Static_assert(nitems(in6m_statestrs) ==
> +    MLD_LEAVING_MEMBER - MLD_NOT_MEMBER + 1, "Missing MLD group state");
>  
>  static const char *
>  in6m_state_str(const int state)
Then, why not switch to the array designated initializers syntax, which
fixes such errors outright?




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