mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Cleanup of net/if_media.c: simplify cleanup loop in ifmedia_removeall().
Reviewed by: hselasky Sponsored by: Mellanox Technologies/NVidia Networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27034
This commit is contained in:
parent
899322fdfa
commit
e399f19dba
1 changed files with 1 additions and 2 deletions
|
|
@ -102,8 +102,7 @@ ifmedia_removeall(struct ifmedia *ifm)
|
|||
{
|
||||
struct ifmedia_entry *entry;
|
||||
|
||||
for (entry = LIST_FIRST(&ifm->ifm_list); entry;
|
||||
entry = LIST_FIRST(&ifm->ifm_list)) {
|
||||
while ((entry = LIST_FIRST(&ifm->ifm_list)) != NULL) {
|
||||
LIST_REMOVE(entry, ifm_list);
|
||||
free(entry, M_IFADDR);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue