projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25ac5bb
)
ide: remove undefined behavior in ide-test
author
John Snow
<jsnow@redhat.com>
Wed, 8 Feb 2017 17:05:33 +0000
(12:05 -0500)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Tue, 28 Feb 2017 06:03:38 +0000
(09:03 +0300)
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>
tests/ide-test.c
patch
|
blob
|
history
diff --git
a/tests/ide-test.c
b/tests/ide-test.c
index fb541f88b5f69b3fdf0ed5848ad2d8d4c530a629..b57c2b1676de8d9687e46b1c695ef17e0bd62ba6 100644
(file)
--- 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);