From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nd86s-0002BB-2K for qemu-devel@nongnu.org; Thu, 04 Feb 2010 15:15:30 -0500 Received: from [199.232.76.173] (port=51261 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nd86r-0002B1-MF for qemu-devel@nongnu.org; Thu, 04 Feb 2010 15:15:29 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nd86q-0004T4-95 for qemu-devel@nongnu.org; Thu, 04 Feb 2010 15:15:29 -0500 Received: from mx20.gnu.org ([199.232.41.8]:11913) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nd86p-0004Q4-Pk for qemu-devel@nongnu.org; Thu, 04 Feb 2010 15:15:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nd86o-00042g-Nm for qemu-devel@nongnu.org; Thu, 04 Feb 2010 15:15:26 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o14KFLSL012366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Feb 2010 15:15:21 -0500 Received: from localhost (vpn-9-202.rdu.redhat.com [10.11.9.202]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o14KFJ2L010232 for ; Thu, 4 Feb 2010 15:15:20 -0500 From: Luiz Capitulino Date: Thu, 4 Feb 2010 18:13:13 -0200 Message-Id: <1265314396-6583-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1265314396-6583-1-git-send-email-lcapitulino@redhat.com> References: <1265314396-6583-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 1/4] qjson: Improve debugging List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Add an assert() to qobject_from_jsonf() to assure that the returned QObject is not NULL. Currently this is duplicated in the callers. Signed-off-by: Luiz Capitulino --- qjson.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qjson.c b/qjson.c index 9ad8a91..0922c06 100644 --- a/qjson.c +++ b/qjson.c @@ -62,6 +62,7 @@ QObject *qobject_from_jsonf(const char *string, ...) obj = qobject_from_jsonv(string, &ap); va_end(ap); + assert(obj != NULL); return obj; } -- 1.6.6