[libvirt] [PATCH v3 24/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/uml/*

Eric Blake eblake at redhat.com
Thu May 9 03:42:19 UTC 2013


On 05/03/2013 08:53 AM, Michal Privoznik wrote:
> ---
>  src/uml/uml_conf.c   | 10 ++++------
>  src/uml/uml_driver.c |  8 +++-----
>  2 files changed, 7 insertions(+), 11 deletions(-)

/me needs to go to bed before my eyes glaze over...

> +++ b/src/uml/uml_driver.c
> @@ -491,7 +490,7 @@ umlStateInitialize(bool privileged,
>                          "%s/log/libvirt/uml", LOCALSTATEDIR) == -1)
>              goto out_of_memory;
>  
> -        if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
> +        if (VIR_STRDUP_QUIET(base, SYSCONFDIR "/libvirt") < 0)

Why VIR_STRDUP_QUIET here?  Ah, this function was using VIR_ERROR
instead of normal virReportOOMError().  I think this is another case
where changing from quiet->noisy is probably better.

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130508/df1621c9/attachment-0001.sig>


More information about the libvir-list mailing list