[PATCH 01/48] qemu: Drop misleading comment for qemuDomainQueryWakeupSuspendSupport()

Michal Privoznik posted 48 patches 3 years, 3 months ago
[PATCH 01/48] qemu: Drop misleading comment for qemuDomainQueryWakeupSuspendSupport()
Posted by Michal Privoznik 3 years, 3 months ago
The was an attempt to document the retvals for
qemuDomainQueryWakeupSuspendSupport(). However, it's misleading
because in reality, the function can return nothing but 0 or -1,
but the comment implies retval of 1 too.

Since the set of possible return values complies with our
unwritten rule (0 for success, -1 for error), there's no real
value in having the comment and as such can be dropped.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_driver.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 59a3b37b98..7c8fc8949c 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16313,7 +16313,6 @@ qemuDomainProbeQMPCurrentMachine(virDomainObj *vm,
 }
 
 
-/* returns -1 on error, or if query is not supported, 0 if query was successful */
 static int
 qemuDomainQueryWakeupSuspendSupport(virDomainObj *vm,
                                     bool *wakeupSupported)
-- 
2.37.4
Re: [PATCH 01/48] qemu: Drop misleading comment for qemuDomainQueryWakeupSuspendSupport()
Posted by Ján Tomko 3 years, 3 months ago
On a Tuesday in 2022, Michal Privoznik wrote:
>The was an attempt to document the retvals for
>qemuDomainQueryWakeupSuspendSupport(). However, it's misleading
>because in reality, the function can return nothing but 0 or -1,
>but the comment implies retval of 1 too.
>
>Since the set of possible return values complies with our
>unwritten rule (0 for success, -1 for error), there's no real
>value in having the comment and as such can be dropped.
>
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> src/qemu/qemu_driver.c | 1 -
> 1 file changed, 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano