blob: b461a60df7bc313e256a78abaf6240f19c708427 [file] [log] [blame]
From 157d67f152777754c059ced7511352102f23ffae Mon Sep 17 00:00:00 2001
From: Nate Karstens <nate.karstens@garmin.com>
Date: Mon, 24 Jul 2017 09:39:18 -0500
Subject: [PATCH 06/11] Remove unneeded function
Removes a function we no longer need by integrating it into the only
function that calls it. This was originally separated so that we could
only process network interfaces that netlink indicated had been changed,
this has since been extended to test for all network intefaces.
Upstream-Status: Submitted [dts@apple.com]
Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
---
mDNSPosix/mDNSPosix.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
index 59a8b8c..3fc5451 100644
--- a/mDNSPosix/mDNSPosix.c
+++ b/mDNSPosix/mDNSPosix.c
@@ -1079,24 +1079,15 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD)
return err;
}
-mDNSlocal mDNSBool ListContainsInterfaceIndex(GenLinkedList *list, int if_index)
+mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
{
NetworkInterfaceIndex *item;
for (item = (NetworkInterfaceIndex*)list->Head; item != NULL; item = item->Next)
{
- if (if_index == item->if_index) return mDNStrue;
+ if (if_index == item->if_index) return;
}
- return mDNSfalse;
-}
-
-mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
-{
- NetworkInterfaceIndex *item;
-
- if (ListContainsInterfaceIndex(list, if_index)) return;
-
item = malloc(sizeof *item);
if (item == NULL) return;
--
2.17.1