aboutsummaryrefslogtreecommitdiff
path: root/socket.c
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
commit5cabef8200e2537bb2c9903aea48763dfb188d67 (patch)
treef076f4a48d139ee0ee45a353287f36f47224394f /socket.c
parentf7c64080498ebb2d6aa1c988673f53693a9905ea (diff)
downloadslirp-5cabef8200e2537bb2c9903aea48763dfb188d67.zip
slirp-5cabef8200e2537bb2c9903aea48763dfb188d67.tar.gz
slirp-5cabef8200e2537bb2c9903aea48763dfb188d67.tar.bz2
Fix warning about variables used uninitialized
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5378 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index 8247103..d0ffb0b 100644
--- a/socket.c
+++ b/socket.c
@@ -106,6 +106,8 @@ int soread(so) struct socket *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... */
@@ -313,6 +315,8 @@ int sowrite(so) struct socket *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... */