On 04/22/2014 06:49 AM, Jiri Denemark wrote: > virStorageFileChainLookup is able to give use virStorageSourcePtr which > contains the pointer to its canonical path. There's no need for the > caller to store both of them. > > Former top_meta maps to topSource and top_canon maps to topSource->path. > > Signed-off-by: Jiri Denemark <[email protected]> > --- > src/qemu/qemu_driver.c | 27 +++++++++++++-------------- > 1 file changed, 13 insertions(+), 14 deletions(-)
ACK - it's nice to see the sort of cleanups we can do now that the
structs aren't as complicated.
> @@ -15363,11 +15362,11 @@ qemuDomainBlockCommit(virDomainPtr dom, const char
> *path, const char *base,
> * virStorageFileChainLookup guarantees a simple pointer
> * comparison will work, rather than needing full-blown STREQ. */
> if ((flags & VIR_DOMAIN_BLOCK_COMMIT_SHALLOW) &&
> - base_canon != top_meta->backingStore->path) {
> + base_canon != topSource->backingStore->path) {
Given the testsuite rework I did, I'm a bit more worried about pointer
equality here, and we may need to use STREQ after all. But we can
double-check that after finishing the rest of the cleanups in your series.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
