mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Compile errors are way more useful then panics later.
Replace a KASSERT of LINUX_IFNAMSIZ == IFNAMSIZ with a preprocessor check and #error message. This will prevent nasty suprises if users change IFNAMSIZ without updating the linux code appropriatly.
This commit is contained in:
parent
42353aeb6d
commit
fe753c29f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144070
@ -70,6 +70,10 @@ __FBSDID("$FreeBSD$");
|
||||
#include <compat/linux/linux_mib.h>
|
||||
#include <compat/linux/linux_util.h>
|
||||
|
||||
#if (LINUX_IFNAMSIZ != IFNAMSIZ)
|
||||
#error "LINUX_IFNAMSIZ != IFNAMSIZ"
|
||||
#endif
|
||||
|
||||
static linux_ioctl_function_t linux_ioctl_cdrom;
|
||||
static linux_ioctl_function_t linux_ioctl_vfat;
|
||||
static linux_ioctl_function_t linux_ioctl_console;
|
||||
@ -2235,9 +2239,6 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
|
||||
struct file *fp;
|
||||
int error, type;
|
||||
|
||||
KASSERT(LINUX_IFNAMSIZ == IFNAMSIZ,
|
||||
("%s(): LINUX_IFNAMSIZ != IFNAMSIZ", __func__));
|
||||
|
||||
ifp = NULL;
|
||||
error = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user