[libvirt] [PATCH 02/10] nwfilter: use consistent OOM reporting
Stefan Berger
stefanb at us.ibm.com
Thu Aug 19 18:41:19 UTC 2010
libvir-list-bounces at redhat.com wrote on 08/18/2010 07:45:05 PM:
> libvir-list-bounces at redhat.com
>
> * src/nwfilter/nwfilter_driver.c (nwfilterLog): Delete.
> (nwfilterDriverStartup): Use virReportOOMError instead.
> ---
>
> No point making printf uses harder to audit by hiding them in a macro,
> especially when this file already uses virReportOOMError elsewhere.
>
> src/nwfilter/nwfilter_driver.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/src/nwfilter/nwfilter_driver.c
b/src/nwfilter/nwfilter_driver.c
> index 0e8241e..bda50f9 100644
> --- a/src/nwfilter/nwfilter_driver.c
> +++ b/src/nwfilter/nwfilter_driver.c
> @@ -42,9 +42,6 @@
>
> #define VIR_FROM_THIS VIR_FROM_NWFILTER
>
> -#define nwfilterLog(msg...) fprintf(stderr, msg)
> -
> -
> static virNWFilterDriverStatePtr driverState;
>
> static int nwfilterDriverShutdown(void);
> @@ -95,7 +92,6 @@ nwfilterDriverStartup(int privileged) {
> goto error;
>
> if (virAsprintf(&base, "%s/.libvirt", userdir) == -1) {
> - nwfilterLog("out of memory in virAsprintf");
> VIR_FREE(userdir);
> goto out_of_memory;
> }
> @@ -118,7 +114,7 @@ nwfilterDriverStartup(int privileged) {
> return 0;
>
> out_of_memory:
> - nwfilterLog("virNWFilterStartup: out of memory");
> + virReportOOMError();
>
> error:
> VIR_FREE(base);
ACK.
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100819/92964c84/attachment-0001.htm>
More information about the libvir-list
mailing list