gateway: simplify a condition
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 23 Aug 2012 12:15:54 +0000 (14:15 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 24 Aug 2012 08:50:04 +0000 (10:50 +0200)
commit265b7f4bb2bf9c8080ba5d60b7506a72623478db
treef8eba0e5a09b815282b35de1ac6eb70d4035e872
parent66ea2345a7b17d271e509d072f55223461366a06
gateway: simplify a condition

Because of the preceding
  if (ipv4) {
    current_ipv4_gw = NULL;
  }
  if (ipv6) {
    current_ipv6_gw = NULL;
  }

The condition(s)
   if (ipvX && entry != current_ipvX_gw
Are effectively
   if (ipvX && entry != NULL
Also, the test
   entry != NULL
was already performed by the enclosing if statement

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Reviewed-by: Henning Rogge <henning.rogge@fkie.fraunhofer.de>
src/gateway.c