diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-01 19:39:40 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-01 19:39:40 +0000 |
commit | 5cabef8200e2537bb2c9903aea48763dfb188d67 (patch) | |
tree | f076f4a48d139ee0ee45a353287f36f47224394f /socket.c | |
parent | f7c64080498ebb2d6aa1c988673f53693a9905ea (diff) | |
download | slirp-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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... */ |