From patchwork Thu Oct 15 16:06:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 530794 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 B93AA1402B7 for ; Fri, 16 Oct 2015 03:11:35 +1100 (AEDT) Received: from localhost ([::1]:48466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zml7t-0007vb-JE for incoming@patchwork.ozlabs.org; Thu, 15 Oct 2015 12:11:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zml3V-0000Ux-1A for qemu-devel@nongnu.org; Thu, 15 Oct 2015 12:07:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zml3P-0001UD-Mj for qemu-devel@nongnu.org; Thu, 15 Oct 2015 12:07:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zml3P-0001T7-Hl for qemu-devel@nongnu.org; Thu, 15 Oct 2015 12:06:55 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 97550C0BB29A; Thu, 15 Oct 2015 16:06:54 +0000 (UTC) Received: from localhost (ovpn-116-145.ams2.redhat.com [10.36.116.145]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9FG6qT9001482; Thu, 15 Oct 2015 12:06:53 -0400 Date: Thu, 15 Oct 2015 12:06:51 -0400 From: Luiz Capitulino To: Markus Armbruster Message-ID: <20151015120651.249f46d2@redhat.com> In-Reply-To: <1444918537-18107-1-git-send-email-armbru@redhat.com> References: <1444918537-18107-1-git-send-email-armbru@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com Subject: Re: [Qemu-devel] [PATCH 0/6] qobject: Make conversion from QObject * accept null 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 On Thu, 15 Oct 2015 16:15:31 +0200 Markus Armbruster wrote: > The qobject_to_FOO() crash on null, which is a trap for the unwary. > Return null instead, and simplify a few callers. > > Throw in a patch to drop QObject_HEAD. > > Luiz, I'm happy to take this through my tree, since got a QMP series > based on it (to be posted shortly). Please do. Reviewed-by: Luiz Capitulino Btw, what do you think about this patch? :) diff --git a/MAINTAINERS b/MAINTAINERS index 9bd2b8f..aa03f3d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1010,7 +1010,7 @@ F: qemu-timer.c F: vl.c Human Monitor (HMP) -M: Luiz Capitulino +M: Markus Armbruster S: Maintained F: monitor.c F: hmp.c @@ -1073,7 +1073,7 @@ F: qapi/*.json T: git git://repo.or.cz/qemu/armbru.git qapi-next QObject -M: Luiz Capitulino +M: Markus Armbruster S: Maintained F: qobject/ F: include/qapi/qmp/