From patchwork Wed Feb 6 20:27:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 218770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5370D2C02F6 for ; Thu, 7 Feb 2013 08:41:53 +1100 (EST) Received: from localhost ([::1]:51738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3BbA-0007uI-CI for incoming@patchwork.ozlabs.org; Wed, 06 Feb 2013 15:28:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3Baf-00071d-EA for qemu-devel@nongnu.org; Wed, 06 Feb 2013 15:27:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3Bab-00052x-MZ for qemu-devel@nongnu.org; Wed, 06 Feb 2013 15:27:33 -0500 Received: from oxygen.pond.sub.org ([2a01:4f8:121:10e4::3]:59085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3Bab-00052X-Fa for qemu-devel@nongnu.org; Wed, 06 Feb 2013 15:27:29 -0500 Received: from blackfin.pond.sub.org (p5B32B9A6.dip.t-dialin.net [91.50.185.166]) by oxygen.pond.sub.org (Postfix) with ESMTPA id EDB6BA2C87; Wed, 6 Feb 2013 21:27:27 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 74328200AF; Wed, 6 Feb 2013 21:27:26 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2013 21:27:19 +0100 Message-Id: <1360182446-1502-7-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1360182446-1502-1-git-send-email-armbru@redhat.com> References: <1360182446-1502-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:121:10e4::3 Cc: lilei@linux.vnet.ibm.com, lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH for-1.4 v2 06/13] qmp: Drop superfluous special case "empty" in qmp_memchar_read() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Markus Armbruster --- qemu-char.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 4dd01e6..9d1c02c 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);