diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/guest-random.c | 2 | ||||
-rw-r--r-- | util/qemu-option.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/util/guest-random.c b/util/guest-random.c index 086115bd67..23643f86cc 100644 --- a/util/guest-random.c +++ b/util/guest-random.c @@ -38,7 +38,7 @@ static int glib_random_bytes(void *buf, size_t len) } if (i < len) { x = g_rand_int(rand); - __builtin_memcpy(buf + i, &x, i - len); + __builtin_memcpy(buf + i, &x, len - i); } return 0; } diff --git a/util/qemu-option.c b/util/qemu-option.c index ee78e42216..61cb4a97bd 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -997,8 +997,6 @@ QemuOpts *qemu_opts_from_qdict(QemuOptsList *list, const QDict *qdict, return NULL; } - assert(opts != NULL); - for (entry = qdict_first(qdict); entry; entry = qdict_next(qdict, entry)) { |