Re: [PATCH 2/2] virGetDomain: Set domain ID too

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

 



On Tue, Mar 28, 2017 at 05:15:08PM +0200, Michal Privoznik wrote:
> So far our code is full of the following pattern:
> 
>   dom = virGetDomain(conn, name, uuid)
>   if (dom)
>       dom->id = 42;
> 
> There is no reasong why it couldn't be just:
> 
>   dom = virGetDomain(conn, name, uuid, id);
> 
> After all, client domain representation consists of tuple (name,
> uuid, id).
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

ACK - looks like a sensible change to improve the static
safety of the code.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

--
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]
  Powered by Linux