From dfc4b8a7d057435eedb7a9a330e9880fdeee4b57 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Apr 2008 16:22:34 +0000 Subject: [PATCH] =?UTF-8?q?C99=20initializer=20on=20=5F=5FlastErr=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20*=20src/virterror.c:=20Use=20C99=20initialize?= =?UTF-8?q?rs=20to=20make=20initialization=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20of=20=5F=5FlastErr=20clearer=20(Guido=20G=C3=BCnther).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 6 ++++++ src/virterror.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 848bdaef02..b85cc3fa94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Apr 2 17:19:00 BST 2008 Richard W.M. Jones + + C99 initializer on __lastErr + * src/virterror.c: Use C99 initializers to make initialization + of __lastErr clearer (Guido Günther). + Tue Apr 1 15:00:03 CEST 2008 Daniel Veillard * src/lxc_conf.c: patch from Dave Leskovec fixing an freed memory diff --git a/src/virterror.c b/src/virterror.c index 92ccf67d93..21109f2cb3 100644 --- a/src/virterror.c +++ b/src/virterror.c @@ -19,7 +19,9 @@ #include "internal.h" virError __lastErr = /* the last error */ -{ 0, 0, NULL, VIR_ERR_NONE, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL }; + { .code = 0, .domain = 0, .message = NULL, .level = VIR_ERR_NONE, + .conn = NULL, .dom = NULL, .str1 = NULL, .str2 = NULL, .str3 = NULL, + .int1 = 0, .int2 = 0, .net = NULL }; static virErrorFunc virErrorHandler = NULL; /* global error handler */ static void *virUserData = NULL; /* associated data */