From patchwork Thu Aug 2 01:02:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 174647 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 469642C008E for ; Thu, 2 Aug 2012 11:54:47 +1000 (EST) Received: from localhost ([::1]:56597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swkcf-0003OK-Gz for incoming@patchwork.ozlabs.org; Wed, 01 Aug 2012 21:54:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swjou-0004gy-8j for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:03:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Swjos-0003Vi-BM for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:03:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swjor-0003VP-HB for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:03:18 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7213FJj016650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Aug 2012 21:03:15 -0400 Received: from localhost (ovpn-113-85.phx2.redhat.com [10.3.113.85]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7213Ete015589; Wed, 1 Aug 2012 21:03:15 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Wed, 1 Aug 2012 22:02:54 -0300 Message-Id: <1343869374-23417-35-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1343869374-23417-1-git-send-email-lcapitulino@redhat.com> References: <1343869374-23417-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com, pbonzini@redhat.com, eblake@redhat.com Subject: [Qemu-devel] [PATCH 34/34] error, qerror: drop QDict member 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 Used to store error information, but it's unused now. Signed-off-by: Luiz Capitulino --- error.c | 4 ---- qerror.c | 4 ---- qerror.h | 1 - 3 files changed, 9 deletions(-) diff --git a/error.c b/error.c index 5c6c90f..b07ffa0 100644 --- a/error.c +++ b/error.c @@ -19,7 +19,6 @@ struct Error { - QDict *obj; char *msg; ErrorClass err_class; }; @@ -53,8 +52,6 @@ Error *error_copy(const Error *err) err_new = g_malloc0(sizeof(*err)); err_new->msg = g_strdup(err->msg); err_new->err_class = err->err_class; - err_new->obj = err->obj; - QINCREF(err_new->obj); return err_new; } @@ -77,7 +74,6 @@ ErrorClass error_get_class(const Error *err) void error_free(Error *err) { if (err) { - QDECREF(err->obj); g_free(err->msg); g_free(err); } diff --git a/qerror.c b/qerror.c index e1606d3..6d924fb 100644 --- a/qerror.c +++ b/qerror.c @@ -102,7 +102,6 @@ void qerror_report(ErrorClass eclass, const char *fmt, ...) /* Evil... */ struct Error { - QDict *obj; char *msg; ErrorClass err_class; }; @@ -113,8 +112,6 @@ void qerror_report_err(Error *err) qerr = qerror_new(); loc_save(&qerr->loc); - QINCREF(err->obj); - qerr->error = err->obj; qerr->err_msg = g_strdup(err->msg); qerr->err_class = err->err_class; @@ -156,7 +153,6 @@ static void qerror_destroy_obj(QObject *obj) assert(obj != NULL); qerr = qobject_to_qerror(obj); - QDECREF(qerr->error); g_free(qerr->err_msg); g_free(qerr); } diff --git a/qerror.h b/qerror.h index 2299e00..3f17c52 100644 --- a/qerror.h +++ b/qerror.h @@ -21,7 +21,6 @@ typedef struct QError { QObject_HEAD; - QDict *error; Location loc; char *err_msg; ErrorClass err_class;