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:
Todd C. Miller
2013-10-22 09:08:09 -06:00
parent 923edabe6c
commit f85106ea67
17 changed files with 299 additions and 311 deletions

View File

@@ -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) {