aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2017-08-17 19:09:29 +0200
committerStephen Hemminger <stephen@networkplumber.org>2017-08-21 17:12:21 -0700
commit44448a90eab34713af019356926828720c67a268 (patch)
tree1901c4a60d9c6bc6e2f4008d03c7751e9250982c /misc
parentb3c5f84493d3399a546566475203207aa5b64d54 (diff)
downloadiproute2-44448a90eab34713af019356926828720c67a268.tar.gz
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>
Diffstat (limited to 'misc')
-rw-r--r--misc/ss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/ss.c b/misc/ss.c
index 10360e5a..419076b2 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);