Re: [PATCH] virGetStorageVol: Don't ignore NULL pool name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 10, 2013 at 12:14:28PM +0200, Michal Privoznik wrote:
> The function takes pool name as argument. However,
> it is not acceptable for it to be NULL. Hence, we
> should check it and report error in case it is.
> ---
>  src/datatypes.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/datatypes.c b/src/datatypes.c
> index f815b6c..884eb3e 100644
> --- a/src/datatypes.c
> +++ b/src/datatypes.c
> @@ -520,6 +520,7 @@ virGetStorageVol(virConnectPtr conn, const char *pool, const char *name,
>          virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
>          return NULL;
>      }
> +    virCheckNonNullArgReturn(pool, NULL);
>      virCheckNonNullArgReturn(name, NULL);
>      virCheckNonNullArgReturn(key, NULL);

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]