blob: b461a60df7bc313e256a78abaf6240f19c708427 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From 157d67f152777754c059ced7511352102f23ffae Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Mon, 24 Jul 2017 09:39:18 -0500
4Subject: [PATCH 06/11] Remove unneeded function
5
6Removes a function we no longer need by integrating it into the only
7function that calls it. This was originally separated so that we could
8only process network interfaces that netlink indicated had been changed,
9this has since been extended to test for all network intefaces.
10
11Upstream-Status: Submitted [dts@apple.com]
12
13Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
14---
15 mDNSPosix/mDNSPosix.c | 13 ++-----------
16 1 file changed, 2 insertions(+), 11 deletions(-)
17
18diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
19index 59a8b8c..3fc5451 100644
20--- a/mDNSPosix/mDNSPosix.c
21+++ b/mDNSPosix/mDNSPosix.c
22@@ -1079,24 +1079,15 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD)
23 return err;
24 }
25
26-mDNSlocal mDNSBool ListContainsInterfaceIndex(GenLinkedList *list, int if_index)
27+mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
28 {
29 NetworkInterfaceIndex *item;
30
31 for (item = (NetworkInterfaceIndex*)list->Head; item != NULL; item = item->Next)
32 {
33- if (if_index == item->if_index) return mDNStrue;
34+ if (if_index == item->if_index) return;
35 }
36
37- return mDNSfalse;
38-}
39-
40-mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
41-{
42- NetworkInterfaceIndex *item;
43-
44- if (ListContainsInterfaceIndex(list, if_index)) return;
45-
46 item = malloc(sizeof *item);
47 if (item == NULL) return;
48
49--
502.17.1
51