From patchwork Mon Mar 3 17:12:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 325961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0B9452C00E8 for ; Tue, 4 Mar 2014 05:07:53 +1100 (EST) Received: from localhost ([::1]:40884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKWgw-00080g-Df for incoming@patchwork.ozlabs.org; Mon, 03 Mar 2014 12:30:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKWYw-0003DN-7k for qemu-devel@nongnu.org; Mon, 03 Mar 2014 12:22:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKWYq-0003Si-19 for qemu-devel@nongnu.org; Mon, 03 Mar 2014 12:21:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKWYp-0003SU-PH for qemu-devel@nongnu.org; Mon, 03 Mar 2014 12:21:51 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s23HLkSr030817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 3 Mar 2014 12:21:47 -0500 Received: from localhost (ovpn-113-127.phx2.redhat.com [10.3.113.127]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s23HLj6N012208; Mon, 3 Mar 2014 12:21:46 -0500 From: Luiz Capitulino To: peter.maydell@linaro.org Date: Mon, 3 Mar 2014 12:12:22 -0500 Message-Id: <1393866743-17385-32-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1393866743-17385-1-git-send-email-lcapitulino@redhat.com> References: <1393866743-17385-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws Subject: [Qemu-devel] [PULL 31/32] qapi: Clean up superfluous null check in qapi_dealloc_type_str() 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 From: Markus Armbruster Argument can't be null. No other Visitor method type_str() checks for null. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi/qapi-dealloc-visitor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c index dc53545..d0ea118 100644 --- a/qapi/qapi-dealloc-visitor.c +++ b/qapi/qapi-dealloc-visitor.c @@ -131,9 +131,7 @@ static void qapi_dealloc_end_list(Visitor *v, Error **errp) static void qapi_dealloc_type_str(Visitor *v, char **obj, const char *name, Error **errp) { - if (obj) { - g_free(*obj); - } + g_free(*obj); } static void qapi_dealloc_type_int(Visitor *v, int64_t *obj, const char *name,