]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virnetdevvlan: Fix return type of virNetDevVlanEqual()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 14 May 2025 13:46:16 +0000 (15:46 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 15 May 2025 08:49:25 +0000 (10:49 +0200)
The virNetDevVlanEqual() function is declared to return an int
but in fact its return type is a boolean. Even its only caller
(qemuDomainChangeNet()) treats its retval as a boolean. Switch
the return type from integer to boolean.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/util/virnetdevvlan.c
src/util/virnetdevvlan.h

index b0e05d8ffe496a61a96da2b221f10978aa0e471e..453b8d0ac9ee80d852778fe25160ce1861a33cfe 100644 (file)
@@ -41,7 +41,7 @@ virNetDevVlanFree(virNetDevVlan *vlan)
     g_free(vlan);
 }
 
-int
+bool
 virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b)
 {
     int ai, bi;
index fd2f8023f5188510bfc51dd9de04ac12470068fd..59f7fa523da2037176885e4abba5ea13f25e9a08 100644 (file)
@@ -41,7 +41,7 @@ struct _virNetDevVlan {
 
 void virNetDevVlanClear(virNetDevVlan *vlan);
 void virNetDevVlanFree(virNetDevVlan *vlan);
-int virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b);
+bool virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b);
 void virNetDevVlanCopy(virNetDevVlan *dst, const virNetDevVlan *src);
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevVlan, virNetDevVlanFree);