On Thu, Mar 04, 2021 at 01:58:17PM +0100, Kristina Hanicova wrote:
With this, incomplete XML without <frames/> for <rx/> in
coalesce
won't raise error as before. It will leave the coalesce parameter
empty, thanks to passing it as a parameter and return an integer
to indicate error state - previously it returned pointer (or NULL
for both error and incomplete XML).
The code went through some refactoring:
* change of a condition
* addition of a parameter
* change of order, that allowed removal of VIR_FREE
* removal of redundant labels and variables
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1535930
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/conf/domain_conf.c | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
The code is good, but it could use some test(s). I guess you have couple of
options here:
- just show that parsing it does nothing in simple qemuxml2xmltest
- make sure that this makes it possible to remove the coalesce settings in
qemuhotplugtest. This might not be the case and it might result in more
patches because, honestly, I am not 100% sure how to handle removal of
coalesce parameters versus not touching them on update.
Since this is not a critical thing to do, I'll leave that up to you to decide
how to approach this ;)
Thanks,
Martin