From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sym8P-0001M9-EU for qemu-devel@nongnu.org; Tue, 07 Aug 2012 11:55:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sym8O-0006HG-Dt for qemu-devel@nongnu.org; Tue, 07 Aug 2012 11:55:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sym8O-0006HB-4m for qemu-devel@nongnu.org; Tue, 07 Aug 2012 11:55:52 -0400 From: Luiz Capitulino Date: Tue, 7 Aug 2012 12:53:45 -0300 Message-Id: <1344354826-10375-35-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1344354826-10375-1-git-send-email-lcapitulino@redhat.com> References: <1344354826-10375-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 34/35] error, qerror: drop QDict member List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com, pbonzini@redhat.com, eblake@redhat.com 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 0e10373..1f05fc4 100644 --- a/error.c +++ b/error.c @@ -19,7 +19,6 @@ struct Error { - QDict *obj; char *msg; ErrorClass err_class; }; @@ -51,8 +50,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; } @@ -75,7 +72,6 @@ const char *error_get_pretty(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 ccc52be..0818504 100644 --- a/qerror.c +++ b/qerror.c @@ -100,7 +100,6 @@ void qerror_report(ErrorClass eclass, const char *fmt, ...) /* Evil... */ struct Error { - QDict *obj; char *msg; ErrorClass err_class; }; @@ -111,8 +110,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; @@ -154,7 +151,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 c5ad29f..d0a76a4 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; -- 1.7.11.2.249.g31c7954.dirty