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>
This commit is contained in:
John Snow 2017-02-08 12:05:33 -05:00 committed by Michael Tokarev
parent 25ac5bbec4
commit 6048018ef6
1 changed files with 1 additions and 0 deletions

View File

@ -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);