OSDN Git Service

qmp: Drop superfluous special case "empty" in qmp_memchar_read()
authorMarkus Armbruster <armbru@redhat.com>
Wed, 6 Feb 2013 20:27:19 +0000 (21:27 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 6 Feb 2013 22:35:18 +0000 (16:35 -0600)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char.c

index 4dd01e6..9d1c02c 100644 (file)
@@ -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);