Re: [PATCH 01/39] qemuDomainStorageSourceValidateDepth: Define chain depth as macro

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

 



On a Thursday in 2021, Peter Krempa wrote:
The magic constant will be used in one more place.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
src/qemu/qemu_domain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 76e8903dbc..f818fce271 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7471,6 +7471,7 @@ qemuDomainStorageAlias(const char *device, int depth)
 *
 * Returns 0 on success and -1 if the chain is too deep. Error is reported.
 */
+#define QEMU_DOMAIN_STORAGE_SOURCE_CHAIN_MAX_DEPTH 200

This looks out of place, as if the comment was describing this constant
and not the function.

Consider moving it above the comment (since the comment still references
200 by number)

Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano


int
qemuDomainStorageSourceValidateDepth(virStorageSourcePtr src,
                                     int add,

Attachment: signature.asc
Description: PGP signature


[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