[Olsr-dev] [olsrd] [PATCH v1 28/29] gateway: minor simplification to olsr_set_inet_gateway
Ferry Huberts
(spam-protected)
Tue Jul 24 18:09:17 CEST 2012
From: Ferry Huberts <(spam-protected)>
Signed-off-by: Ferry Huberts <(spam-protected)>
---
src/gateway.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/gateway.c b/src/gateway.c
index d5815cf..d54f748 100644
--- a/src/gateway.c
+++ b/src/gateway.c
@@ -457,13 +457,11 @@ olsr_set_inetgw_handler(struct olsr_gw_handler *h) {
*/
bool
olsr_set_inet_gateway(union olsr_ip_addr *originator, bool ipv4, bool ipv6, bool external) {
- struct gateway_entry *entry, *oldV4, *oldV6;
- struct olsr_iptunnel_entry *tunnelV4, *tunnelV6;
-
- oldV4 = current_ipv4_gw;
- oldV6 = current_ipv6_gw;
- tunnelV4 = v4gw_tunnel;
- tunnelV6 = v6gw_tunnel;
+ struct gateway_entry *entry;
+ struct gateway_entry *oldV4 = current_ipv4_gw;
+ struct gateway_entry *oldV6 = current_ipv6_gw;
+ struct olsr_iptunnel_entry *tunnelV4 = v4gw_tunnel;
+ struct olsr_iptunnel_entry *tunnelV6 = v6gw_tunnel;
ipv4 = ipv4 && (olsr_cnf->ip_version == AF_INET || olsr_cnf->use_niit);
ipv6 = ipv6 && (olsr_cnf->ip_version == AF_INET6);
--
1.7.10.4
More information about the Olsr-dev
mailing list