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 <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2017-08-17 19:09:29 +02:00 committed by Stephen Hemminger
parent b3c5f84493
commit 44448a90ea
1 changed files with 1 additions and 1 deletions

View File

@ -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);