From ecf18ba4c89aded4187ca0344572d5881c0445cd Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 13 Jun 2022 20:34:05 -0400 Subject: [PATCH] freebsd_network: Cleanup around ifmedia handling. * Remove unused variable. * Use original value for IFM_AVALID, we do not need to remap this one. (Actually we do not need to remap IFM_ACTIVE here either, but it makes some things slightly easier to work with rather than remapping it in a different location.) --- src/libs/compat/freebsd_network/compat/net/if_media.h | 3 +-- src/libs/compat/freebsd_network/device_hooks.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/compat/freebsd_network/compat/net/if_media.h b/src/libs/compat/freebsd_network/compat/net/if_media.h index 6d6631f523..d11493282e 100644 --- a/src/libs/compat/freebsd_network/compat/net/if_media.h +++ b/src/libs/compat/freebsd_network/compat/net/if_media.h @@ -374,11 +374,10 @@ uint64_t ifmedia_baudrate(int); /* * Status bits */ -#ifndef __HAIKU__ #define IFM_AVALID 0x00000001 /* Active bit valid */ +#ifndef __HAIKU__ #define IFM_ACTIVE 0x00000002 /* Interface attached to working net */ #else -#define IFM_AVALID 0x10000000 /* Active bit valid */ #define IFM_ACTIVE 0x00800000 /* same as Haiku's */ #endif diff --git a/src/libs/compat/freebsd_network/device_hooks.c b/src/libs/compat/freebsd_network/device_hooks.c index d62097b127..7d90f2caec 100644 --- a/src/libs/compat/freebsd_network/device_hooks.c +++ b/src/libs/compat/freebsd_network/device_hooks.c @@ -299,7 +299,6 @@ compat_control(void *cookie, uint32 op, void *arg, size_t length) { struct ifmediareq mediareq; ether_link_state_t state; - status_t status; if (length < sizeof(ether_link_state_t)) return EINVAL;