]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_nat.c
authorAndrey Volk <andywolk@gmail.com>
Fri, 12 Jul 2019 16:44:19 +0000 (20:44 +0400)
committerAndrey Volk <andywolk@gmail.com>
Mon, 15 Jul 2019 19:43:48 +0000 (23:43 +0400)
src/switch_nat.c

index 5b3fa5d54338df180bb979d2b72690c0a199f1c0..f6b9bc553b859c2c6b8e81b05a8b66eeb00a7250 100644 (file)
@@ -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 == ' ') {