[PATCH 14/29] qemu: Add spaces after casts

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

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/qemu/qemu_capabilities.c     | 14 +++++++-------
 src/qemu/qemu_command.c          |  6 +++---
 src/qemu/qemu_domain.c           | 14 +++++++-------
 src/qemu/qemu_driver.c           | 10 +++++-----
 src/qemu/qemu_migration_cookie.c |  2 +-
 src/qemu/qemu_monitor.c          | 10 +++++-----
 src/qemu/qemu_monitor_text.c     |  6 +++---
 src/qemu/qemu_process.c          |  4 ++--
 8 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 833c75514c25..441764baf742 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3115,7 +3115,7 @@ virQEMUCapsLoadCache(virArch hostArch,
 
     ctxt->node = xmlDocGetRootElement(doc);
 
-    if (STRNEQ((const char *)ctxt->node->name, "qemuCaps")) {
+    if (STRNEQ((const char *) ctxt->node->name, "qemuCaps")) {
         virReportError(VIR_ERR_XML_ERROR,
                        _("unexpected root element <%s>, "
                          "expecting <qemuCaps>"),
@@ -3549,8 +3549,8 @@ virQEMUCapsSaveFile(void *data,
 
     VIR_DEBUG("Saved caps '%s' for '%s' with (%lld, %lld)",
               filename, qemuCaps->binary,
-              (long long)qemuCaps->ctime,
-              (long long)qemuCaps->libvirtCtime);
+              (long long) qemuCaps->ctime,
+              (long long) qemuCaps->libvirtCtime);
 
     ret = 0;
  cleanup:
@@ -3576,10 +3576,10 @@ virQEMUCapsIsValid(void *data,
         VIR_DEBUG("Outdated capabilities for '%s': libvirt changed "
                   "(%lld vs %lld, %lu vs %lu)",
                   qemuCaps->binary,
-                  (long long)qemuCaps->libvirtCtime,
-                  (long long)virGetSelfLastChanged(),
-                  (unsigned long)qemuCaps->libvirtVersion,
-                  (unsigned long)LIBVIR_VERSION_NUMBER);
+                  (long long) qemuCaps->libvirtCtime,
+                  (long long) virGetSelfLastChanged(),
+                  (unsigned long) qemuCaps->libvirtVersion,
+                  (unsigned long) LIBVIR_VERSION_NUMBER);
         return false;
     }
 
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b666f3715f55..70e77def49a4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6848,7 +6848,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
     if (cpu_flags && !cpu) {
         const char *default_model;
 
-        switch ((int)def->os.arch) {
+        switch ((int) def->os.arch) {
         case VIR_ARCH_I686:
             default_model = "qemu32";
             break;
@@ -6894,7 +6894,7 @@ qemuBuildObsoleteAccelArg(virCommandPtr cmd,
     bool disableKVM = false;
     bool enableKVM = false;
 
-    switch ((int)def->virtType) {
+    switch ((int) def->virtType) {
     case VIR_DOMAIN_VIRT_QEMU:
         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
             disableKVM = true;
@@ -8273,7 +8273,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
     /* For types whose implementations use a netdev on the host, add
      * an entry to nicindexes for passing on to systemd.
     */
-    switch ((virDomainNetType)actualType) {
+    switch ((virDomainNetType) actualType) {
     case VIR_DOMAIN_NET_TYPE_ETHERNET:
     case VIR_DOMAIN_NET_TYPE_NETWORK:
     case VIR_DOMAIN_NET_TYPE_BRIDGE:
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 326c939c85c0..248ff3e55101 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3624,7 +3624,7 @@ qemuDomainChrSourceReconnectDefValidate(const virDomainChrSourceReconnectDef *de
 static int
 qemuDomainChrSourceDefValidate(const virDomainChrSourceDef *def)
 {
-    switch ((virDomainChrType)def->type) {
+    switch ((virDomainChrType) def->type) {
     case VIR_DOMAIN_CHR_TYPE_TCP:
         if (qemuDomainChrSourceReconnectDefValidate(&def->data.tcp.reconnect) < 0)
             return -1;
@@ -5227,7 +5227,7 @@ qemuDomainControllerDefPostParse(virDomainControllerDefPtr cont,
                                  virQEMUCapsPtr qemuCaps,
                                  unsigned int parseFlags)
 {
-    switch ((virDomainControllerType)cont->type) {
+    switch ((virDomainControllerType) cont->type) {
     case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
         /* Set the default SCSI controller model if not already set */
         if (qemuDomainSetSCSIControllerModel(def, cont, qemuCaps) < 0)
@@ -6755,8 +6755,8 @@ ssize_t qemuDomainLogContextRead(qemuDomainLogContextPtr ctxt,
 {
     VIR_DEBUG("Context read %p manager=%p inode=%llu pos=%llu",
               ctxt, ctxt->manager,
-              (unsigned long long)ctxt->inode,
-              (unsigned long long)ctxt->pos);
+              (unsigned long long) ctxt->inode,
+              (unsigned long long) ctxt->pos);
     char *buf;
     size_t buflen;
     if (ctxt->manager) {
@@ -11097,7 +11097,7 @@ qemuDomainDetachDeviceUnlink(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
         if (i == ndevMountsPath) {
             if (virProcessRunInMountNamespace(vm->pid,
                                               qemuDomainDetachDeviceUnlinkHelper,
-                                              (void *)file) < 0)
+                                              (void *) file) < 0)
                 goto cleanup;
         }
     }
@@ -11264,7 +11264,7 @@ qemuDomainNamespaceSetupHostdev(virDomainObjPtr vm,
     if (qemuDomainGetHostdevPath(NULL, hostdev, false, &npaths, &paths, NULL) < 0)
         goto cleanup;
 
-    if (qemuDomainNamespaceMknodPaths(vm, (const char **)paths, npaths) < 0)
+    if (qemuDomainNamespaceMknodPaths(vm, (const char **) paths, npaths) < 0)
         goto cleanup;
 
     ret = 0;
@@ -11292,7 +11292,7 @@ qemuDomainNamespaceTeardownHostdev(virDomainObjPtr vm,
         goto cleanup;
 
     if (npaths != 0 &&
-        qemuDomainNamespaceUnlinkPaths(vm, (const char **)paths, npaths) < 0)
+        qemuDomainNamespaceUnlinkPaths(vm, (const char **) paths, npaths) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7484b00e23c3..cc0da6bf29d4 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -439,7 +439,7 @@ static int
 qemuDomainSnapshotLoad(virDomainObjPtr vm,
                        void *data)
 {
-    char *baseDir = (char *)data;
+    char *baseDir = (char *) data;
     char *snapDir = NULL;
     DIR *dir = NULL;
     struct dirent *entry;
@@ -1331,9 +1331,9 @@ qemuGetSchedInfo(unsigned long long *cpuWait,
     /* In general, we cannot assume pid_t fits in int; but /proc parsing
      * is specific to Linux where int works fine.  */
     if (tid)
-        ret = virAsprintf(&proc, "/proc/%d/task/%d/sched", (int)pid, (int)tid);
+        ret = virAsprintf(&proc, "/proc/%d/task/%d/sched", (int) pid, (int) tid);
     else
-        ret = virAsprintf(&proc, "/proc/%d/sched", (int)pid);
+        ret = virAsprintf(&proc, "/proc/%d/sched", (int) pid);
     if (ret < 0)
         goto cleanup;
     ret = -1;
@@ -1376,7 +1376,7 @@ qemuGetSchedInfo(unsigned long long *cpuWait,
                 goto cleanup;
             }
 
-            *cpuWait = (unsigned long long)(val * 1000000);
+            *cpuWait = (unsigned long long) (val * 1000000);
             break;
         }
     }
@@ -1435,7 +1435,7 @@ qemuGetProcessInfo(unsigned long long *cpuTime, int *lastCpu, long *vm_rss,
      */
     if (cpuTime)
         *cpuTime = 1000ull * 1000ull * 1000ull * (usertime + systime)
-            / (unsigned long long)sysconf(_SC_CLK_TCK);
+            / (unsigned long long) sysconf(_SC_CLK_TCK);
     if (lastCpu)
         *lastCpu = cpu;
 
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index eca1b74d63bc..5c710da85966 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -160,7 +160,7 @@ qemuDomainExtractTLSSubject(const char *certdir)
         goto error;
     }
 
-    pemdatum.data = (unsigned char *)pemdata;
+    pemdatum.data = (unsigned char *) pemdata;
     pemdatum.size = strlen(pemdata);
 
     ret = gnutls_x509_crt_import(cert, &pemdatum, GNUTLS_X509_FMT_PEM);
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index f642d9a51ab6..c17bc1f45a07 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -431,11 +431,11 @@ qemuMonitorIOProcess(qemuMonitorPtr mon)
 # if DEBUG_RAW_IO
     char *str1 = qemuMonitorEscapeNonPrintable(msg ? msg->txBuffer : "");
     char *str2 = qemuMonitorEscapeNonPrintable(mon->buffer);
-    VIR_ERROR(_("Process %d %p %p [[[[%s]]][[[%s]]]"), (int)mon->bufferOffset, mon->msg, msg, str1, str2);
+    VIR_ERROR(_("Process %d %p %p [[[[%s]]][[[%s]]]"), (int) mon->bufferOffset, mon->msg, msg, str1, str2);
     VIR_FREE(str1);
     VIR_FREE(str2);
 # else
-    VIR_DEBUG("Process %d", (int)mon->bufferOffset);
+    VIR_DEBUG("Process %d", (int) mon->bufferOffset);
 # endif
 #endif
 
@@ -465,7 +465,7 @@ qemuMonitorIOProcess(qemuMonitorPtr mon)
         mon->bufferOffset = mon->bufferLength = 0;
     }
 #if DEBUG_IO
-    VIR_DEBUG("Process done %d used %d", (int)mon->bufferOffset, len);
+    VIR_DEBUG("Process done %d used %d", (int) mon->bufferOffset, len);
 #endif
     if (msg && msg->finished)
         virCondBroadcast(&mon->notify);
@@ -489,7 +489,7 @@ qemuMonitorIOWriteWithFD(qemuMonitorPtr mon,
     memset(&msg, 0, sizeof(msg));
     memset(control, 0, sizeof(control));
 
-    iov[0].iov_base = (void *)data;
+    iov[0].iov_base = (void *) data;
     iov[0].iov_len = len;
 
     msg.msg_iov = iov;
@@ -617,7 +617,7 @@ qemuMonitorIORead(qemuMonitorPtr mon)
     }
 
 #if DEBUG_IO
-    VIR_DEBUG("Now read %d bytes of data", (int)mon->bufferOffset);
+    VIR_DEBUG("Now read %d bytes of data", (int) mon->bufferOffset);
 #endif
 
     return ret;
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 7c34ca5b07e2..69b0b3685427 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -104,7 +104,7 @@ int qemuMonitorTextIOProcess(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
     /* Don't print raw data in debug because its full of control chars */
     /*VIR_DEBUG("Process data %d byts of data [%s]", len - used, data + used);*/
 #if DEBUG_IO
-    VIR_DEBUG("Process data %d byts of data", (int)(len - used));
+    VIR_DEBUG("Process data %d byts of data", (int) (len - used));
 #endif
 
     /* Look for a non-zero reply followed by prompt */
@@ -763,7 +763,7 @@ int qemuMonitorTextGetBlockInfo(qemuMonitorPtr mon,
     p = reply;
 
     while (*p) {
-        p = (char *)qemuAliasDiskDriveSkipPrefix(p);
+        p = (char *) qemuAliasDiskDriveSkipPrefix(p);
 
         eol = strchr(p, '\n');
         if (!eol)
@@ -1039,7 +1039,7 @@ int qemuMonitorTextSetVNCPassword(qemuMonitorPtr mon,
 
     if (qemuMonitorTextCommandWithHandler(mon, "change vnc password",
                                           qemuMonitorSendVNCPassphrase,
-                                          (char *)password,
+                                          (char *) password,
                                           -1, &info) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        "%s", _("setting VNC password failed"));
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 6a5262ae46ab..93001d0c9c36 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5371,8 +5371,8 @@ static int
 qemuProcessVcpusSortOrder(const void *a,
                           const void *b)
 {
-    virDomainVcpuDefPtr vcpua = *((virDomainVcpuDefPtr *)a);
-    virDomainVcpuDefPtr vcpub = *((virDomainVcpuDefPtr *)b);
+    virDomainVcpuDefPtr vcpua = *((virDomainVcpuDefPtr *) a);
+    virDomainVcpuDefPtr vcpub = *((virDomainVcpuDefPtr *) b);
 
     return vcpua->order - vcpub->order;
 }
-- 
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