From: Phil Sutter Date: Thu, 17 Aug 2017 17:09:29 +0000 (+0200) Subject: ss: Skip useless check in parse_hostcond() X-Git-Tag: v4.13.0~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44448a90eab34713af019356926828720c67a268;p=thirdparty%2Fiproute2.git ss: Skip useless check in parse_hostcond() The passed 'addr' parameter is dereferenced by caller before and in parse_hostcond() multiple times before this check, so assume it is always true. Signed-off-by: Phil Sutter --- diff --git a/misc/ss.c b/misc/ss.c index 10360e5a0..419076b2d 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -1671,7 +1671,7 @@ void *parse_hostcond(char *addr, bool is_port) } } } - if (!is_port && addr && *addr && *addr != '*') { + if (!is_port && *addr && *addr != '*') { if (get_prefix_1(&a.addr, addr, fam)) { if (get_dns_host(&a, addr, fam)) { fprintf(stderr, "Error: an inet prefix is expected rather than \"%s\".\n", addr);