git: 9883961ed5af - main - linux(4): Drop excess assert that Linux IFNAMSIZ is equal to FreeBSD
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 04 Mar 2023 09:12:52 UTC
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=9883961ed5af5f0ade31579e95ac53e8c514faed commit 9883961ed5af5f0ade31579e95ac53e8c514faed Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-03-04 09:11:39 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-03-04 09:11:39 +0000 linux(4): Drop excess assert that Linux IFNAMSIZ is equal to FreeBSD While here use _Static_assert() instead of the older CTASSERT(). --- sys/compat/linux/linux.c | 2 +- sys/compat/linux/linux_ioctl.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 273e2a0295c1..a4df46d7f9a7 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #include <compat/linux/linux_mib.h> #include <compat/linux/linux_util.h> -CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); +_Static_assert(LINUX_IFNAMSIZ == IFNAMSIZ, "Linux IFNAMSIZ"); static bool use_real_ifnames = false; SYSCTL_BOOL(_compat_linux, OID_AUTO, use_real_ifnames, CTLFLAG_RWTUN, diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 839c3a61d647..6d15ecdfa939 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -86,8 +86,6 @@ __FBSDID("$FreeBSD$"); #include <cam/scsi/scsi_sg.h> -CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); - #define DEFINE_LINUX_IOCTL_SET(shortname, SHORTNAME) \ static linux_ioctl_function_t linux_ioctl_ ## shortname; \ static struct linux_ioctl_handler shortname ## _handler = { \