diff options
author | John Snow | 2017-02-08 18:05:33 +0100 |
---|---|---|
committer | Michael Tokarev | 2017-02-28 07:03:38 +0100 |
commit | 6048018ef6112476b529807ad603015314151bb2 (patch) | |
tree | a712ba281e4a994ea4ad2b746d97541b18a14e8c | |
parent | CODING_STYLE: Mention preferred comment form (diff) | |
download | qemu-6048018ef6112476b529807ad603015314151bb2.tar.gz qemu-6048018ef6112476b529807ad603015314151bb2.tar.xz qemu-6048018ef6112476b529807ad603015314151bb2.zip |
ide: remove undefined behavior in ide-test
trivial: initialize the dirty buffer with a random-ish byte.
Stops valgrind from whining about uninitialized buffers.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | tests/ide-test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/ide-test.c b/tests/ide-test.c index fb541f88b5..b57c2b1676 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -544,6 +544,7 @@ static void make_dirty(uint8_t device) guest_buf = guest_alloc(guest_malloc, len); buf = g_malloc(len); + memset(buf, rand() % 255 + 1, len); g_assert(guest_buf); g_assert(buf); |