Use SLIST and STAILQ macros instead of doing headless singly linked
lists manually. As a bonus we now use a tail queue for ldap.c and sudoreplay.c.
This commit is contained in:
@@ -70,7 +70,7 @@ addr_matches_if(char *n)
|
||||
addr.ip4.s_addr = inet_addr(n);
|
||||
}
|
||||
|
||||
for (ifp = get_interfaces(); ifp != NULL; ifp = ifp->next) {
|
||||
SLIST_FOREACH(ifp, get_interfaces(), entries) {
|
||||
if (ifp->family != family)
|
||||
continue;
|
||||
switch (family) {
|
||||
@@ -153,7 +153,7 @@ addr_matches_if_netmask(char *n, char *m)
|
||||
}
|
||||
#endif /* HAVE_STRUCT_IN6_ADDR */
|
||||
|
||||
for (ifp = get_interfaces(); ifp != NULL; ifp = ifp->next) {
|
||||
SLIST_FOREACH(ifp, get_interfaces(), entries) {
|
||||
if (ifp->family != family)
|
||||
continue;
|
||||
switch (family) {
|
||||
|
Reference in New Issue
Block a user