[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Wed Oct 24 02:25:19 PDT 2012


 src/modules/rtp/module-rtp-recv.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 2a33b07d69a5c08b3325ca3f1ec40f428c659ce5
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Tue Oct 23 17:37:24 2012 +0200

    rtp: Fix warning using pa_assert_not_reached()
    
      modules/rtp/module-rtp-recv.c:462:8: warning: 'r' may be used uninitialized in this function [-Wuninitialized]
    
    Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>

diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 412f4c3..3e9250c 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -451,13 +451,14 @@ static int mcast_socket(const struct sockaddr* sa, socklen_t salen) {
         mr4.imr_multiaddr = ((const struct sockaddr_in*) sa)->sin_addr;
         r = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr4, sizeof(mr4));
 #ifdef HAVE_IPV6
-    } else {
+    } else if (af == AF_INET6) {
         struct ipv6_mreq mr6;
         memset(&mr6, 0, sizeof(mr6));
         mr6.ipv6mr_multiaddr = ((const struct sockaddr_in6*) sa)->sin6_addr;
         r = setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mr6, sizeof(mr6));
 #endif
-    }
+    } else
+        pa_assert_not_reached();
 
     if (r < 0) {
         pa_log_info("Joining mcast group failed: %s", pa_cstrerror(errno));



More information about the pulseaudio-commits mailing list