On Tue, Aug 09, 2016 at 10:49:04AM +0200, Xian Han Yu wrote:
Signed-off-by: Xian Han Yu <xhy...@linux.vnet.ibm.com>
---

You could've been more descriptive in the commit message.  Like
describing what's the reason for this change?  Just to initialize bool
to 'false' instead 0?  Is there something more to it?

src/conf/node_device_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index a23d8ef..96fdb6f 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -1163,7 +1163,7 @@ virNodeDevCapPCIDevIommuGroupParseXML(xmlXPathContextPtr 
ctxt,
        goto cleanup;

    for (i = 0; i < nAddrNodes; i++) {
-        virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 };
+        virPCIDeviceAddress addr = { 0, 0, 0, 0, false };

Honestly, I have no idea what preferences we have for such
initializations, but I for one prefer initialization to '{0}' which
guarantees everything to be zeroed anyway.  And will be readable the
same way even when we change the structure.  Would that work for you as
well?

        if (virPCIDeviceAddressParseXML(addrNodes[i], &addr) < 0)
            goto cleanup;
        if (VIR_ALLOC(pciAddr) < 0)
--
2.5.5

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

Attachment: signature.asc
Description: Digital signature

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

Reply via email to