[PATCH] util: Change return type of functions that never fail to void

2024-11-28 Thread Alexander Kuznetsov
These functions return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hypervisor/virhostdev.c | 21

[PATCH] Change return type of functions that use VIR_EXPAND_N and never fail to void

2024-11-28 Thread Alexander Kuznetsov
These functions return value is invariant since VIR_EXPAND_N check removal in 7d2fd6e, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/access

[PATCH v2 0/4] util: Change return type of functions that never fail to void

2024-11-28 Thread Alexander Kuznetsov
These functions return value is invariant since 18f3771, so change its type and remove all dependent checks. Best regards, Alexander Kuznetsov --- v2: - One function per commit. Alexander Kuznetsov (4): util: Change return type of virPCIDeviceSetUsedBy to void util: Change return type of

[PATCH v2 2/4] util: Change return type of virSCSIDeviceSetUsedBy to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hypervisor/virhostdev.c | 12 src

[PATCH v2 3/4] util: Change return type of virSCSIVHostDeviceSetUsedBy to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hypervisor/virhostdev.c | 3 +-- src/util

[PATCH v2 4/4] logging: Change return type of virLogDaemonConfigFilePat to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/logging/log_daemon.c| 8 ++-- src

[PATCH v2 1/4] util: Change return type of virPCIDeviceSetUsedBy to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hypervisor/virhostdev.c | 6 ++ src/util

[PATCH v2 2/6] rpc: Change return type of virNetServerAddProgram to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since VIR_EXPAND_N check removal in 7d2fd6e, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/locking

[PATCH v2 1/6] access: Change return type of virAccessDriverStackAppend to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since VIR_EXPAND_N check removal in 7d2fd6e, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/access

[PATCH v2 0/6] Change return type of functions that use VIR_EXPAND_N and never fail to void

2024-11-28 Thread Alexander Kuznetsov
These functions return value is invariant since VIR_EXPAND_N check removal in 7d2fd6e, so change its type and remove all dependent checks. Best regards, Alexander Kuznetsov --- v2: - One function/file per commit. Alexander Kuznetsov (6): access: Change return type of

[PATCH v2 6/6] util: virsysinfo: Change return type of functions that never fail to void

2024-11-28 Thread Alexander Kuznetsov
These functions return value is invariant since VIR_EXPAND_N check removal in 7d2fd6e, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/util/virsysinfo.c

[PATCH v2 3/6] rpc: Change return type of virNetClientAddProgram to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since VIR_EXPAND_N check removal in 7d2fd6e, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/admin

[PATCH v2 4/6] rpc: Change return type of virNetClientAddStream to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since VIR_EXPAND_N check removal in 7d2fd6e, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/remote

[PATCH v2 5/6] hyperv: Change return type of hypervCheckParams to void

2024-11-28 Thread Alexander Kuznetsov
This function return value is invariant since VIR_EXPAND_N check removal in 7d2fd6e, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hyperv/hyperv_wmi.c

Re: [PATCH] qemu: snapshot: Remove dead code in qemuSnapshotDeleteBlockJobFinishing()

2025-02-05 Thread Alexander Kuznetsov
Kindly reminding about this small cosmetic fix

Re: [PATCH] util: netdevvlan: Change return type of virNetDevVlanCopy to void

2025-02-05 Thread Alexander Kuznetsov
Kindly reminding about this small cosmetic fix

[PATCH v3 1/4] util: Change return type of virPCIDeviceSetUsedBy to void

2024-12-16 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov Reviewed-by: Jiri Denemark --- src/hypervisor

[PATCH v3 0/4] util: Change return type of functions that never fail to void

2024-12-16 Thread Alexander Kuznetsov
These functions return value is invariant since 18f3771, so change its type and remove all dependent checks. Best regards, Alexander Kuznetsov --- v3: - Fix indentation errors. - 2: add missing virSCSIDeviceSetUsedBy call - 3: remove non-relevant cosmetic fix v2: - One function per commit

[PATCH v3 2/4] util: Change return type of virSCSIDeviceSetUsedBy to void

2024-12-16 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hypervisor/virhostdev.c | 13 + src

[PATCH v3 3/4] util: Change return type of virSCSIVHostDeviceSetUsedBy to void

2024-12-16 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hypervisor/virhostdev.c | 3 +-- src/util

[PATCH v3 4/4] logging: Change return type of virLogDaemonConfigFilePat to void

2024-12-16 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov Reviewed-by: Jiri Denemark --- src/logging/log_daemon.c

Re: [PATCH v2 3/4] util: Change return type of virSCSIVHostDeviceSetUsedBy to void

2024-12-13 Thread Alexander Kuznetsov
x this small cosmetic thing, but I thought it was too small for a separate patch. Should it be taken out separately, or left until possible changes in the affected function? -- Best regards, Alexander Kuznetsov

Re: [PATCH v2 0/6] Change return type of functions that use VIR_EXPAND_N and never fail to void

2024-12-13 Thread Alexander Kuznetsov
Submit patches guideline recommends to ping if there is no response for more than a week, so I kindly remind about these cosmetic fixes too :)

Re: [PATCH v2 1/4] util: Change return type of virPCIDeviceSetUsedBy to void

2024-12-13 Thread Alexander Kuznetsov
tag when sending v3, since 2 patches have it, and 2 patches don't. Should I add it to my commit message to these 2 patches? "Submit patches" wasn't clear at this point, so I wanted to clarify Thanks again for your time and patience! -- Best regards, Alexander Kuznetsov

Re: [PATCH v2 0/4] util: Change return type of functions that never fail to void

2024-12-13 Thread Alexander Kuznetsov
Submit patches guideline recommends to ping if there is no response for more than a week, so I kindly remind about these and neighboring cosmetic fixes :) -- Best regards, Alexander Kuznetsov

[PATCH] qemu: snapshot: Remove dead code in qemuSnapshotDeleteBlockJobFinishing()

2025-01-22 Thread Alexander Kuznetsov
qemuSnapshotDeleteBlockJobFinishing() returns only 0 and 1. Convert it to bool and remove the dead code handling -1 return in the caller. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Reported-by: Andrey Slepykh Signed-off-by: Alexander Kuznetsov --- src/qemu

[PATCH] util: netdevvlan: Change return type of virNetDevVlanCopy to void

2025-01-22 Thread Alexander Kuznetsov
This function return value is invariant since 1022e0ee, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Alexander Rudyuk Signed-off-by: Alexander Kuznetsov --- src/conf/domain_conf.c | 9 +++-- src

[PATCH] virbitmap: Change return type of virBitmapToData to void

2025-03-26 Thread Alexander Kuznetsov
This function return value is invariant since e59b8f9, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Signed-off-by: Artem Chernyshev Signed-off-by: Alexander Kuznetsov --- src/ch/ch_monitor.c| 5 + src

[PATCH v2 1/1] nss: Fix memory leak in findLease

2025-04-15 Thread Alexander Kuznetsov
: Alexander Kuznetsov --- tools/nss/libvirt_nss.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c index d79a00a1b0..a1f33ee27b 100644 --- a/tools/nss/libvirt_nss.c +++ b/tools/nss/libvirt_nss.c @@ -137,12 +137,13 @@ findLease

[PATCH v2 0/1] nss: Fix memory leak in findLease

2025-04-15 Thread Alexander Kuznetsov
v2: - don't touch free() call inside LIBVIRT_NSS_GUEST macro - rearrange asprintf to be called after realloc, so no extra free call is needed Alexander Kuznetsov (1): nss: Fix memory leak in findLease tools/nss/libvirt_nss.c | 7 --- 1 file changed, 4 insertions(+), 3 dele

[PATCH] virNWFilterIncludeDefToRuleInst: Prevent potential double g_free

2025-04-14 Thread Alexander Kuznetsov
If virNWFilterDefToInst returns -1, it has already called virNWFilterInstReset. Remove the additional call to prevent a double g_free Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Dmitry Fedin Signed-off-by: Alexander Kuznetsov --- src/nwfilter

[PATCH v2 0/1] nwfilter: Avoid possible double free in virNWFilterInstReset()

2025-04-14 Thread Alexander Kuznetsov
v2: - switch use g_clear_pointer instead of removing virNWFilterInstReset call Alexander Kuznetsov (1): nwfilter: Avoid possible double free in virNWFilterInstReset() src/nwfilter/nwfilter_gentech_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.42.4

[PATCH v2 1/1] nwfilter: Avoid possible double free in virNWFilterInstReset()

2025-04-14 Thread Alexander Kuznetsov
virNWFilterInstReset() may be called multiple times, leading to a double g_free() Replace plain g_free() with g_clear_pointer() to prevent this Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Dmitry Fedin Signed-off-by: Alexander Kuznetsov --- src/nwfilter

[PATCH v2 0/1] virsh: prevent potential NULL dereference

2025-04-14 Thread Alexander Kuznetsov
v2: - switch to use STRNEQ_NULLABLE instead of simple nullness check Alexander Kuznetsov (1): virsh: prevent potential NULL dereference tools/virsh-completer-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.42.4

[PATCH v2 1/1] virsh: prevent potential NULL dereference

2025-04-14 Thread Alexander Kuznetsov
virXPathString() can return NULL so we need to use STRNEQ_NULLABLE here Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Dmitry Fedin Signed-off-by: Alexander Kuznetsov --- tools/virsh-completer-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Alexander Kuznetsov
Fedin Signed-off-by: Alexander Kuznetsov --- tools/nss/libvirt_nss.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c index d79a00a1b0..190cc7a3dd 100644 --- a/tools/nss/libvirt_nss.c +++ b/tools/nss/libvirt_nss.c @@ -141,8

Re: [PATCH] virbitmap: Change return type of virBitmapToData to void

2025-04-16 Thread Alexander Kuznetsov
kindly reminder about these cosmetics :)

[PATCH] virsh: prevent potential NULL dereference

2025-04-15 Thread Alexander Kuznetsov
virXPathString() can return NULL so we need to check it before calling strcmp() Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Dmitry Fedin Signed-off-by: Alexander Kuznetsov --- tools/virsh-completer-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 0/1] util: netdevvlan: Change return type of virNetDevVlanCopy to void

2025-03-07 Thread Alexander Kuznetsov
Thanks for the review! v2: - remove check for source vlan being not NULL and fix wrongly changed statement - remove pointless return at the end of the function Alexander Kuznetsov (1): util: netdevvlan: Change return type of virNetDevVlanCopy to void src/conf/domain_conf.c | 9

[PATCH v2 1/1] util: netdevvlan: Change return type of virNetDevVlanCopy to void

2025-03-07 Thread Alexander Kuznetsov
This function return value is invariant since 1022e0ee, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Alexander Rudyuk Signed-off-by: Alexander Kuznetsov --- src/conf/domain_conf.c | 9 +++-- src