mirror of
https://github.com/qemu/qemu.git
synced 2025-01-23 22:13:25 +08:00
Fix warning about variables used uninitialized
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5378 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
dbed7e40f6
commit
66029f6a2f
@ -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... */
|
||||
|
Loading…
Reference in New Issue
Block a user