summaryrefslogtreecommitdiffstats
path: root/source/lib/socket_wrapper
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-10-06 12:18:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:14 -0500
commit90bfa3461038f5d179525dec0cf5b3f137e927e0 (patch)
tree57740f8037a7214574bd25829d66aff6a76dd4ef /source/lib/socket_wrapper
parent65e1500ae6b5ca6334a63f4a18272568202bc048 (diff)
downloadsamba-90bfa3461038f5d179525dec0cf5b3f137e927e0.tar.gz
samba-90bfa3461038f5d179525dec0cf5b3f137e927e0.tar.xz
samba-90bfa3461038f5d179525dec0cf5b3f137e927e0.zip
r19126: Fix some uninitialized variable warnings
Diffstat (limited to 'source/lib/socket_wrapper')
-rw-r--r--source/lib/socket_wrapper/socket_wrapper.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/lib/socket_wrapper/socket_wrapper.c b/source/lib/socket_wrapper/socket_wrapper.c
index 006aba1e9d4..9915789f0b5 100644
--- a/source/lib/socket_wrapper/socket_wrapper.c
+++ b/source/lib/socket_wrapper/socket_wrapper.c
@@ -587,11 +587,11 @@ static struct swrap_packet *swrap_packet_init(struct timeval *tval,
size_t packet_len;
size_t alloc_len;
size_t nonwire_len = sizeof(packet->frame);
- size_t wire_hdr_len;
- size_t wire_len;
+ size_t wire_hdr_len = 0;
+ size_t wire_len = 0;
size_t icmp_hdr_len = 0;
size_t icmp_truncate_len = 0;
- unsigned char protocol, icmp_protocol;
+ unsigned char protocol = 0, icmp_protocol = 0;
unsigned short src_port = src_addr->sin_port;
unsigned short dest_port = dest_addr->sin_port;
@@ -983,11 +983,14 @@ static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *add
tcp_ctl = 0x10; /* ACK */
break;
+ default:
+ return;
}
swrapGetTimeOfDay(&tv);
- packet = swrap_packet_init(&tv, src_addr, dest_addr, si->type, buf, len,
+ packet = swrap_packet_init(&tv, src_addr, dest_addr, si->type,
+ (const unsigned char *)buf, len,
tcp_seq, tcp_ack, tcp_ctl, unreachable,
&packet_len);
if (!packet) {