From: Markus Armbruster Date: Wed, 6 Feb 2013 20:27:19 +0000 (+0100) Subject: qmp: Drop superfluous special case "empty" in qmp_memchar_read() X-Git-Tag: qemu-xen-4.4.0-rc1~6^2~1193 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c287e99fe47b179e6ef6b212139821b4d78934c1;p=qemu-upstream-4.5-testing.git qmp: Drop superfluous special case "empty" in qmp_memchar_read() Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Anthony Liguori --- diff --git a/qemu-char.c b/qemu-char.c index 4dd01e645..9d1c02cd1 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2818,10 +2818,6 @@ char *qmp_memchar_read(const char *device, int64_t size, } count = qemu_chr_cirmem_count(chr); - if (count == 0) { - return g_strdup(""); - } - size = size > count ? count : size; read_data = g_malloc0(size + 1);