From: Andrey Volk Date: Fri, 12 Jul 2019 16:44:19 +0000 (+0400) Subject: FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_nat.c X-Git-Tag: v1.10.0~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68d680eb25af9a9ef62636778cc019b60c91b6fb;p=thirdparty%2Ffreeswitch.git FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_nat.c --- diff --git a/src/switch_nat.c b/src/switch_nat.c index 5b3fa5d543..f6b9bc553b 100644 --- a/src/switch_nat.c +++ b/src/switch_nat.c @@ -295,7 +295,7 @@ static void *SWITCH_THREAD_FUNC switch_nat_multicast_runtime(switch_thread_t * t if (nat_globals.nat_type == SWITCH_NAT_TYPE_UPNP) { /* look for our desc URL and servicetype in the packet */ - if (strstr(buf, nat_globals.descURL) && (buf == NULL || strstr(buf, nat_globals.data.servicetype))) { + if (strstr(buf, nat_globals.descURL) && strstr(buf, nat_globals.data.servicetype)) { if ((pos = strstr(buf, "NTS:"))) { pos = pos + 4; while (*pos && *pos == ' ') {