socket wrapper: Fix 'might be used uninitialized' warning
authorTim Prouty <tprouty@samba.org>
Wed, 4 Mar 2009 20:59:16 +0000 (12:59 -0800)
committerTim Prouty <tprouty@samba.org>
Wed, 4 Mar 2009 20:59:16 +0000 (12:59 -0800)
lib/socket_wrapper/socket_wrapper.c

index f9ef48e4d66f5766bf901ecadb0a734dd9d46182..8ad9e1d93eaa31df6cea9870e94cc89644c2afc9 100644 (file)
@@ -831,11 +831,11 @@ static uint8_t *swrap_packet_init(struct timeval *tval,
        size_t icmp_hdr_len = 0;
        size_t icmp_truncate_len = 0;
        uint8_t protocol = 0, icmp_protocol = 0;
        size_t icmp_hdr_len = 0;
        size_t icmp_truncate_len = 0;
        uint8_t protocol = 0, icmp_protocol = 0;
-       const struct sockaddr_in *src_in;
-       const struct sockaddr_in *dest_in;
+       const struct sockaddr_in *src_in = NULL;
+       const struct sockaddr_in *dest_in = NULL;
 #ifdef HAVE_IPV6
 #ifdef HAVE_IPV6
-       const struct sockaddr_in6 *src_in6;
-       const struct sockaddr_in6 *dest_in6;
+       const struct sockaddr_in6 *src_in6 = NULL;
+       const struct sockaddr_in6 *dest_in6 = NULL;
 #endif
        uint16_t src_port;
        uint16_t dest_port;
 #endif
        uint16_t src_port;
        uint16_t dest_port;