[libvirt] [PATCH 1/5] use virReportErrorHelper instead of xmlGenericError
Eric Blake
eblake at redhat.com
Thu Feb 17 23:44:39 UTC 2011
On 02/17/2011 02:14 PM, Christophe Fergeau wrote:
> ---
> src/util/hash.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/util/hash.c b/src/util/hash.c
> index c7a52c9..ba156b1 100644
> --- a/src/util/hash.c
> +++ b/src/util/hash.c
> @@ -190,9 +190,10 @@ virHashGrow(virHashTablePtr table, int size)
> VIR_FREE(oldtable);
>
> #ifdef DEBUG_GROW
> - xmlGenericError(xmlGenericErrorContext,
> - "virHashGrow : from %d to %d, %d elems\n", oldsize,
> - size, nbElem);
> + virReportErrorHelper(NULL, VIR_FROM_NONE, VIR_ERR_OK, __FILE__,
> + __FUNCTION__, __LINE__,
> + "virHashGrow : from %d to %d, %d elems",
> + oldsize, size, nbElem);
I'd rather use VIR_DEBUG than virReportErrorHelper here.
I pushed this instead:
diff --git i/src/util/hash.c w/src/util/hash.c
index c7a52c9..41df7ae 100644
--- i/src/util/hash.c
+++ w/src/util/hash.c
@@ -3,6 +3,7 @@
*
* Reference: Your favorite introductory book on algorithms
*
+ * Copyright (C) 2011 Red Hat, Inc.
* Copyright (C) 2000 Bjorn Reese and Daniel Veillard.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -26,6 +27,7 @@
#include "virterror_internal.h"
#include "hash.h"
#include "memory.h"
+#include "logging.h"
#define VIR_FROM_THIS VIR_FROM_NONE
@@ -190,9 +192,8 @@ virHashGrow(virHashTablePtr table, int size)
VIR_FREE(oldtable);
#ifdef DEBUG_GROW
- xmlGenericError(xmlGenericErrorContext,
- "virHashGrow : from %d to %d, %d elems\n", oldsize,
- size, nbElem);
+ VIR_DEBUG("virHashGrow : from %d to %d, %ld elems\n", oldsize,
+ size, nbElem);
#endif
return (0);
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110217/5440c301/attachment-0001.sig>
More information about the libvir-list
mailing list