]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6956 modify commit 16365501 to use one single line which is only tolerable way...
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 3 Nov 2014 20:03:04 +0000 (14:03 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 3 Nov 2014 20:03:12 +0000 (14:03 -0600)
src/switch_stun.c

index 55f8a65eaca9b8c5f23c2c3d4bb220103fb62af5..b29c48d325e38a92bb063415b1ebc4c7ef3f83f5 100644 (file)
@@ -129,9 +129,7 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, ui
        packet = (switch_stun_packet_t *) buf;
        packet->header.type = ntohs(packet->header.type);
        packet->header.length = ntohs(packet->header.length);
-       if (packet->header.length > (bytes_left -= 20))
-               return NULL;
-
+       if (packet->header.length > (bytes_left -= 20)) return NULL;
 
        /*
         * Check packet type (RFC3489(bis?) values)