[PATCH 16/29] rpc: Add spaces after casts

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

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/rpc/virnetsaslcontext.c  |  4 ++--
 src/rpc/virnetserverclient.c |  4 ++--
 src/rpc/virnetservermdns.c   |  4 ++--
 src/rpc/virnetsshsession.c   | 12 ++++++------
 src/rpc/virnettlscontext.c   |  4 ++--
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c
index b4db5c40c60f..53a7f076c52b 100644
--- a/src/rpc/virnetsaslcontext.c
+++ b/src/rpc/virnetsaslcontext.c
@@ -283,7 +283,7 @@ const char *virNetSASLSessionGetIdentity(virNetSASLSessionPtr sasl)
                        _("no client username was found"));
         goto cleanup;
     }
-    VIR_DEBUG("SASL client username %s", (const char *)val);
+    VIR_DEBUG("SASL client username %s", (const char *) val);
 
  cleanup:
     virObjectUnlock(sasl);
@@ -306,7 +306,7 @@ int virNetSASLSessionGetKeySize(virNetSASLSessionPtr sasl)
         ssf = -1;
         goto cleanup;
     }
-    ssf = *(const int *)val;
+    ssf = *(const int *) val;
 
  cleanup:
     virObjectUnlock(sasl);
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index b373ca1a8b48..52541ee17735 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -1202,7 +1202,7 @@ static ssize_t virNetServerClientRead(virNetServerClientPtr client)
     if (client->rx->bufferLength <= client->rx->bufferOffset) {
         virReportError(VIR_ERR_RPC,
                        _("unexpected zero/negative length request %lld"),
-                       (long long int)(client->rx->bufferLength - client->rx->bufferOffset));
+                       (long long int) (client->rx->bufferLength - client->rx->bufferOffset));
         client->wantClose = true;
         return -1;
     }
@@ -1379,7 +1379,7 @@ static ssize_t virNetServerClientWrite(virNetServerClientPtr client)
     if (client->tx->bufferLength < client->tx->bufferOffset) {
         virReportError(VIR_ERR_RPC,
                        _("unexpected zero/negative length request %lld"),
-                       (long long int)(client->tx->bufferLength - client->tx->bufferOffset));
+                       (long long int) (client->tx->bufferLength - client->tx->bufferOffset));
         client->wantClose = true;
         return -1;
     }
diff --git a/src/rpc/virnetservermdns.c b/src/rpc/virnetservermdns.c
index 0a2bc87322f8..1d5ef4f4701e 100644
--- a/src/rpc/virnetservermdns.c
+++ b/src/rpc/virnetservermdns.c
@@ -349,8 +349,8 @@ static AvahiTimeout *virNetServerMDNSTimeoutNew(const AvahiPoll *api ATTRIBUTE_U
     }
 
     VIR_DEBUG("Trigger timed for %d %d      %d %d",
-               (int)now.tv_sec, (int)now.tv_usec,
-               (int)(tv ? tv->tv_sec : 0), (int)(tv ? tv->tv_usec : 0));
+               (int) now.tv_sec, (int) now.tv_usec,
+               (int) (tv ? tv->tv_sec : 0), (int) (tv ? tv->tv_usec : 0));
     nowms = (now.tv_sec * 1000ll) + (now.tv_usec / 1000ll);
     if (tv) {
         thenms = (tv->tv_sec * 1000ll) + (tv->tv_usec/1000ll);
diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index 6566f36ce01c..298de96ffe8a 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -267,7 +267,7 @@ virNetSSHKbIntCb(const char *name ATTRIBUTE_UNUSED,
  cleanup:
     if (askcred) {
         for (i = 0; i < num_prompts; i++) {
-            char *prompt = (char *)askcred[i].prompt;
+            char *prompt = (char *) askcred[i].prompt;
             VIR_FREE(askcred[i].result);
             VIR_FREE(prompt);
         }
@@ -373,7 +373,7 @@ virNetSSHCheckHostKey(virNetSSHSessionPtr sess)
             keyhashstr = virBufferContentAndReset(&buff);
 
             askKey.type = VIR_CRED_ECHOPROMPT;
-            if (virAsprintf((char **)&askKey.prompt,
+            if (virAsprintf((char **) &askKey.prompt,
                             _("Accept SSH host key with hash '%s' for "
                               "host '%s:%d' (%s/%s)?"),
                             keyhashstr,
@@ -642,7 +642,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSessionPtr sess,
         return -1;
     }
 
-    if (virAsprintf((char **)&retr_passphrase.prompt,
+    if (virAsprintf((char **) &retr_passphrase.prompt,
                     _("Passphrase for key '%s'"),
                     priv->filename) < 0)
         return -1;
@@ -651,12 +651,12 @@ virNetSSHAuthenticatePrivkey(virNetSSHSessionPtr sess,
         virReportError(VIR_ERR_SSH, "%s",
                        _("failed to retrieve private key passphrase: "
                          "callback has failed"));
-        tmp = (char *)retr_passphrase.prompt;
+        tmp = (char *) retr_passphrase.prompt;
         VIR_FREE(tmp);
         return -1;
     }
 
-    tmp = (char *)retr_passphrase.prompt;
+    tmp = (char *) retr_passphrase.prompt;
     VIR_FREE(tmp);
 
     ret = libssh2_userauth_publickey_fromfile(sess->session,
@@ -1250,7 +1250,7 @@ virNetSSHSessionPtr virNetSSHSessionNew(void)
     if (!(sess->session = libssh2_session_init_ex(NULL,
                                                   NULL,
                                                   NULL,
-                                                  (void *)sess))) {
+                                                  (void *) sess))) {
         virReportError(VIR_ERR_SSH, "%s",
                        _("Failed to initialize libssh2 session"));
         goto error;
diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c
index 2c46aebf3169..23975853f5a7 100644
--- a/src/rpc/virnettlscontext.c
+++ b/src/rpc/virnettlscontext.c
@@ -505,7 +505,7 @@ static gnutls_x509_crt_t virNetTLSContextLoadCertFromFile(const char *certFile,
     if (virFileReadAll(certFile, (1<<16), &buf) < 0)
         goto cleanup;
 
-    data.data = (unsigned char *)buf;
+    data.data = (unsigned char *) buf;
     data.size = strlen(buf);
 
     if (gnutls_x509_crt_import(cert, &data, GNUTLS_X509_FMT_PEM) < 0) {
@@ -543,7 +543,7 @@ static int virNetTLSContextLoadCACertListFromFile(const char *certFile,
     if (virFileReadAll(certFile, (1<<16), &buf) < 0)
         goto cleanup;
 
-    data.data = (unsigned char *)buf;
+    data.data = (unsigned char *) buf;
     data.size = strlen(buf);
 
     if (gnutls_x509_crt_list_import(certs, &certMax, &data, GNUTLS_X509_FMT_PEM, 0) < 0) {
-- 
2.17.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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