diff options
Diffstat (limited to 'meta-networking/recipes-protocols/mdns/mdns/0006-Remove-unneeded-function.patch')
-rw-r--r-- | meta-networking/recipes-protocols/mdns/mdns/0006-Remove-unneeded-function.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0006-Remove-unneeded-function.patch b/meta-networking/recipes-protocols/mdns/mdns/0006-Remove-unneeded-function.patch new file mode 100644 index 000000000..b461a60df --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0006-Remove-unneeded-function.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 157d67f152777754c059ced7511352102f23ffae Mon Sep 17 00:00:00 2001 | ||
2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
3 | Date: Mon, 24 Jul 2017 09:39:18 -0500 | ||
4 | Subject: [PATCH 06/11] Remove unneeded function | ||
5 | |||
6 | Removes a function we no longer need by integrating it into the only | ||
7 | function that calls it. This was originally separated so that we could | ||
8 | only process network interfaces that netlink indicated had been changed, | ||
9 | this has since been extended to test for all network intefaces. | ||
10 | |||
11 | Upstream-Status: Submitted [dts@apple.com] | ||
12 | |||
13 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
14 | --- | ||
15 | mDNSPosix/mDNSPosix.c | 13 ++----------- | ||
16 | 1 file changed, 2 insertions(+), 11 deletions(-) | ||
17 | |||
18 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
19 | index 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 | -- | ||
50 | 2.17.1 | ||
51 | |||