From 8c57f8bb2b04372e0f4fe70d2759a90efe23921f Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 17 Jun 2013 08:45:55 +0200 Subject: Remove useless test that is always evaluated as true. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_ LOCALSTATEDIR=\""/usr/local/var/ax25"\" -O2 -Wall -Wno-pointer-sign -MT list ener.o -MD -MP -MF .deps/listener.Tpo -c -o listener.o listener.c listener.c: In function ‘set_route’: listener.c:232:6: warning: the address of ‘iproute2_table’ will always evaluate as ‘true’ [-Waddress] listener.c: In function ‘del_kernel_ip_route’: listener.c:278:6: warning: the address of ‘iproute2_table’ will always evaluate as ‘true’ [-Waddress] Signed-off-by: Ralf Baechle --- ax25rtd/listener.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ax25rtd') diff --git a/ax25rtd/listener.c b/ax25rtd/listener.c index ab84889..9dce370 100644 --- a/ax25rtd/listener.c +++ b/ax25rtd/listener.c @@ -229,7 +229,7 @@ int set_route(config * config, long ip) if (!config->ip_add_route) return 0; - if (iproute2_table && *iproute2_table) + if (*iproute2_table) return iproute2(ip, config->dev, RT_ADD); fds = socket(AF_INET, SOCK_DGRAM, 0); @@ -275,7 +275,7 @@ int del_kernel_ip_route(char *dev, long ip) if (config == NULL || !config->ip_add_route) return 0; - if (iproute2_table && *iproute2_table) + if (*iproute2_table) return iproute2(ip, dev, RT_DEL); fds = socket(AF_INET, SOCK_DGRAM, 0); -- cgit v1.2.3