Received: from eggs.gnu.org ([2001:4830:134:3::10]:57874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX664-0000WF-3L for qemu-devel@nongnu.org; Fri, 18 Oct 2013 05:12:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VX65u-0007E2-JX for qemu-devel@nongnu.org; Fri, 18 Oct 2013 05:11:52 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:37093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX65t-0007Dj-Ta for qemu-devel@nongnu.org; Fri, 18 Oct 2013 05:11:42 -0400 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 Oct 2013 14:41:40 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 34F6D1258056 for ; Fri, 18 Oct 2013 14:42:08 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9I9BVJ237814362 for ; Fri, 18 Oct 2013 14:41:31 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9I9BXxw009146 for ; Fri, 18 Oct 2013 14:41:34 +0530 From: Wenchao Xia Date: Fri, 18 Oct 2013 09:11:13 +0800 Message-Id: <1382058681-14957-6-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1382058681-14957-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1382058681-14957-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 05/13] error: define struct Error in only one place List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@gmail.com, lcapitulino@redhat.com, pbonzini@redhat.com, Wenchao Xia Signed-off-by: Wenchao Xia --- include/qapi/error.h | 5 ++++- qobject/qerror.c | 7 ------- util/error.c | 6 ------ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 7d4c696..8688aaf 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -20,7 +20,10 @@ * A class representing internal errors within QEMU. An error has a ErrorClass * code and a human message. */ -typedef struct Error Error; +typedef struct Error { + char *msg; + ErrorClass err_class; +} Error; /** * Set an indirect pointer to an error given a ErrorClass value and a diff --git a/qobject/qerror.c b/qobject/qerror.c index 3aee1cf..5b487f3 100644 --- a/qobject/qerror.c +++ b/qobject/qerror.c @@ -97,13 +97,6 @@ void qerror_report(ErrorClass eclass, const char *fmt, ...) } } -/* Evil... */ -struct Error -{ - char *msg; - ErrorClass err_class; -}; - void qerror_report_err(Error *err) { QError *qerr; diff --git a/util/error.c b/util/error.c index ec0faa6..da0d221 100644 --- a/util/error.c +++ b/util/error.c @@ -17,12 +17,6 @@ #include "qapi-types.h" #include "qapi/qmp/qerror.h" -struct Error -{ - char *msg; - ErrorClass err_class; -}; - void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...) { Error *err; -- 1.7.1