]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
rpc: change 'isServer' parameter from 'int' to 'bool'
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 4 Nov 2025 15:43:04 +0000 (15:43 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 24 Nov 2025 15:05:09 +0000 (15:05 +0000)
The callers are all passing in a 'bool' value, and this type
should be maintained rather than cast to 'int' and then
inpreted as a bool again later.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/rpc/virnettlsconfig.c
src/rpc/virnettlsconfig.h

index d020083d6a4638cff9eced29b6d2dab0b65e8104..ffab3b4fc8b353a1de670d9843514515d730bd70 100644 (file)
@@ -49,7 +49,7 @@ static void virNetTLSConfigTrust(const char *cacertdir,
     VIR_DEBUG("TLS CA CRL %s", *cacrl);
 }
 
-static void virNetTLSConfigIdentity(int isServer,
+static void virNetTLSConfigIdentity(bool isServer,
                                     const char *certdir,
                                     const char *keydir,
                                     char **cert,
@@ -102,7 +102,7 @@ void virNetTLSConfigSystemTrust(char **cacert,
 }
 
 void virNetTLSConfigCustomIdentity(const char *pkipath,
-                                   int isServer,
+                                   bool isServer,
                                    char **cert,
                                    char **key)
 {
@@ -114,7 +114,7 @@ void virNetTLSConfigCustomIdentity(const char *pkipath,
                             key);
 }
 
-void virNetTLSConfigUserIdentity(int isServer,
+void virNetTLSConfigUserIdentity(bool isServer,
                                  char **cert,
                                  char **key)
 {
@@ -129,7 +129,7 @@ void virNetTLSConfigUserIdentity(int isServer,
                             key);
 }
 
-void virNetTLSConfigSystemIdentity(int isServer,
+void virNetTLSConfigSystemIdentity(bool isServer,
                                    char **cert,
                                    char **key)
 {
@@ -143,7 +143,7 @@ void virNetTLSConfigSystemIdentity(int isServer,
 }
 
 void virNetTLSConfigCustomCreds(const char *pkipath,
-                                int isServer,
+                                bool isServer,
                                 char **cacert,
                                 char **cacrl,
                                 char **cert,
@@ -161,7 +161,7 @@ void virNetTLSConfigCustomCreds(const char *pkipath,
                             key);
 }
 
-void virNetTLSConfigUserCreds(int isServer,
+void virNetTLSConfigUserCreds(bool isServer,
                               char **cacert,
                               char **cacrl,
                               char **cert,
@@ -182,7 +182,7 @@ void virNetTLSConfigUserCreds(int isServer,
                             key);
 }
 
-void virNetTLSConfigSystemCreds(int isServer,
+void virNetTLSConfigSystemCreds(bool isServer,
                                 char **cacert,
                                 char **cacrl,
                                 char **cert,
index 797b3e3ac587acfc85721406a3bff8bffd13a7ac..a9378c18b7df569d4c24602886ede8a6550481c4 100644 (file)
@@ -20,6 +20,7 @@
 
 #pragma once
 
+#include "internal.h"
 #include "configmake.h"
 
 #define LIBVIRT_PKI_DIR SYSCONFDIR "/pki"
@@ -39,29 +40,29 @@ void virNetTLSConfigSystemTrust(char **cacert,
                                 char **cacrl);
 
 void virNetTLSConfigCustomIdentity(const char *pkipath,
-                                   int isServer,
+                                   bool isServer,
                                    char **cert,
                                    char **key);
-void virNetTLSConfigUserIdentity(int isServer,
+void virNetTLSConfigUserIdentity(bool isServer,
                                  char **cert,
                                  char **key);
-void virNetTLSConfigSystemIdentity(int isServer,
+void virNetTLSConfigSystemIdentity(bool isServer,
                                    char **cert,
                                    char **key);
 
 
 void virNetTLSConfigCustomCreds(const char *pkipath,
-                                int isServer,
+                                bool isServer,
                                 char **cacert,
                                 char **cacrl,
                                 char **cert,
                                 char **key);
-void virNetTLSConfigUserCreds(int isServer,
+void virNetTLSConfigUserCreds(bool isServer,
                               char **cacert,
                               char **cacrl,
                               char **cert,
                               char **key);
-void virNetTLSConfigSystemCreds(int isServer,
+void virNetTLSConfigSystemCreds(bool isServer,
                                 char **cacert,
                                 char **cacrl,
                                 char **cert,