Re: [PATCH 1/2] conf: Increase virNetDevBandwidthParse intelligence

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

 




On 01/07/2015 12:31 PM, Michal Privoznik wrote:
> There's this function virNetDevBandwidthParse which parses the
> bandwidth XML snippet. But it's not clever much. For the
> following XML it allocates the virNetDevBandwidth structure even
> though it's completely empty:
> 
>     <bandwidth>
>     </bandwidth>
> 
> Later in the code there are some places where we check if
> bandwidth was set or not. And since we obtained pointer from the
> parsing function we think that it is when in fact it isn't.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c           | 10 ++++++----
>  src/conf/netdev_bandwidth_conf.c | 38 +++++++++++++++++++++++---------------
>  src/conf/netdev_bandwidth_conf.h |  7 ++++---
>  src/conf/network_conf.c          |  7 +++----
>  tests/virnetdevbandwidthtest.c   | 12 ++++++------
>  5 files changed, 42 insertions(+), 32 deletions(-)
> 

ACK

John

--
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]