aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-01 19:39:40 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-01 19:39:40 +0000
commit66029f6a2f717873f2d170681f0250801a6d0d39 (patch)
treeddbe24da3b24b88bd58fe7d5303fafbd271efb2b
parentdbed7e40f62d359e2a59da724ca8da7143a3b075 (diff)
downloadqemu-66029f6a2f717873f2d170681f0250801a6d0d39.zip
qemu-66029f6a2f717873f2d170681f0250801a6d0d39.tar.gz
qemu-66029f6a2f717873f2d170681f0250801a6d0d39.tar.bz2
Fix warning about variables used uninitialized
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5378 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--slirp/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/slirp/socket.c b/slirp/socket.c
index 4622409..7bc0dc5 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -116,6 +116,8 @@ soread(so)
len = sb->sb_datalen - sb->sb_cc;
iov[0].iov_base = sb->sb_wptr;
+ iov[1].iov_base = NULL;
+ iov[1].iov_len = 0;
if (sb->sb_wptr < sb->sb_rptr) {
iov[0].iov_len = sb->sb_rptr - sb->sb_wptr;
/* Should never succeed, but... */
@@ -319,6 +321,8 @@ sowrite(so)
len = sb->sb_cc;
iov[0].iov_base = sb->sb_rptr;
+ iov[1].iov_base = NULL;
+ iov[1].iov_len = 0;
if (sb->sb_rptr < sb->sb_wptr) {
iov[0].iov_len = sb->sb_wptr - sb->sb_rptr;
/* Should never succeed, but... */