diff options
| author | Roy Marples <roy@marples.name> | 2019-01-23 11:37:37 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-01-23 11:37:37 +0000 |
| commit | 9c5d198072450e7019b3947e85d8f90e82f97445 (patch) | |
| tree | f78e46f684e3923330adc9b2b396d3dbcfc7c14b /src/if.c | |
| parent | c9463d17ed1dc7ea1b8e7b55476838c0f0a267e1 (diff) | |
| download | dhcpcd-9c5d198072450e7019b3947e85d8f90e82f97445.tar.xz | |
DHCP: Remove #defines for functions when INET is disabled
This allows us to optimise the code better and hopefull
become less error prone.
Diffstat (limited to 'src/if.c')
| -rw-r--r-- | src/if.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -81,8 +81,10 @@ if_free(struct interface *ifp) #ifdef IPV4LL ipv4ll_free(ifp); #endif +#ifdef INET dhcp_free(ifp); ipv4_free(ifp); +#endif dhcp6_free(ifp); ipv6nd_free(ifp); ipv6_free(ifp); @@ -728,11 +730,12 @@ if_cmp(const struct interface *si, const struct interface *ti) return -1; if (si->carrier < ti->carrier) return 1; - +#ifdef INET if (D_STATE_RUNNING(si) && !D_STATE_RUNNING(ti)) return -1; if (!D_STATE_RUNNING(si) && D_STATE_RUNNING(ti)) return 1; +#endif if (RS_STATE_RUNNING(si) && !RS_STATE_RUNNING(ti)) return -1; if (!RS_STATE_RUNNING(si) && RS_STATE_RUNNING(ti)) |
