]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
maint: fix comma style issues: qemu
authorEric Blake <eblake@redhat.com>
Tue, 19 Nov 2013 22:45:43 +0000 (15:45 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 20 Nov 2013 16:14:55 +0000 (09:14 -0700)
Most of our code base uses space after comma but not before;
fix the remaining uses before adding a syntax check.

* src/qemu/qemu_cgroup.c: Consistently use commas.
* src/qemu/qemu_command.c: Likewise.
* src/qemu/qemu_conf.c: Likewise.
* src/qemu/qemu_driver.c: Likewise.
* src/qemu/qemu_monitor.c: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_cgroup.c
src/qemu/qemu_command.c
src/qemu/qemu_conf.c
src/qemu/qemu_driver.c
src/qemu/qemu_monitor.c

index ace7e3573a25b2e8c4a1ebbb064a9fe4f033dbc9..f0cacd057e939326a08a1aca82d9e094386a0860 100644 (file)
@@ -417,7 +417,7 @@ qemuSetupMemoryCgroup(virDomainObjPtr vm)
 {
     qemuDomainObjPrivatePtr priv = vm->privateData;
 
-    if (!virCgroupHasController(priv->cgroup,VIR_CGROUP_CONTROLLER_MEMORY)) {
+    if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_MEMORY)) {
         if (vm->def->mem.hard_limit != 0 ||
             vm->def->mem.soft_limit != 0 ||
             vm->def->mem.swap_hard_limit != 0) {
index 6668fedfe0012132e5785db1ab7218203256ab66..bf325a96ab9cf469daec5249c356c52b00f8444d 100644 (file)
@@ -1149,7 +1149,7 @@ int qemuDomainCCWAddressAssign(virDomainDeviceInfoPtr dev,
         return 0;
     }
 
-    if (virHashAddEntry(addrs->defined,addr,addr) < 0)
+    if (virHashAddEntry(addrs->defined, addr, addr) < 0)
         goto cleanup;
     else
         addr = NULL; /* memory will be freed by hash table */
@@ -1179,7 +1179,7 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def,
     }
 
     for (i = 0; i < def->nnets; i++) {
-        if (STREQ(def->nets[i]->model,"virtio") &&
+        if (STREQ(def->nets[i]->model, "virtio") &&
             def->nets[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
             def->nets[i]->info.type = type;
         }
index 03c9c7d486d27c0ad0614d683b67ad66a468d2d0..580385002989d06e0a199311e8707d780af81145 100644 (file)
@@ -216,7 +216,8 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
     if (VIR_STRDUP(cfg->spiceListen, "127.0.0.1") < 0)
         goto error;
 
-    if (VIR_STRDUP(cfg->spiceTLSx509certdir , SYSCONFDIR "/pki/libvirt-spice") < 0)
+    if (VIR_STRDUP(cfg->spiceTLSx509certdir,
+                   SYSCONFDIR "/pki/libvirt-spice") < 0)
         goto error;
 
     cfg->remotePortMin = QEMU_REMOTE_PORT_MIN;
index 378b542bfe2c47d0cdbdf7de5befbf8901addb68..795e72a2e70223be24d407f92cef1b5eb89fbeb8 100644 (file)
@@ -1918,7 +1918,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
     int agentFlag = QEMU_AGENT_SHUTDOWN_REBOOT;
 
     virCheckFlags(VIR_DOMAIN_REBOOT_ACPI_POWER_BTN |
-                  VIR_DOMAIN_REBOOT_GUEST_AGENT , -1);
+                  VIR_DOMAIN_REBOOT_GUEST_AGENT, -1);
 
     /* At most one of these two flags should be set.  */
     if ((flags & VIR_DOMAIN_REBOOT_ACPI_POWER_BTN) &&
index f7bf49ad341ffc24aa2d3dc4bab0dd01864aee94..1514715d0e46e0b022f1d9bd823cf53d550d6937 100644 (file)
@@ -239,8 +239,8 @@ static char * qemuMonitorEscapeNonPrintable(const char *text)
     for (i = 0; text[i] != '\0'; i++) {
         if (c_isprint(text[i]) ||
             text[i] == '\n' ||
-            (text[i] == '\r' && text[i+1] == '\n'))
-            virBufferAsprintf(&buf,"%c", text[i]);
+            (text[i] == '\r' && text[i + 1] == '\n'))
+            virBufferAddChar(&buf, text[i]);
         else
             virBufferAsprintf(&buf, "0x%02x", text[i]);
     }
@@ -3040,7 +3040,7 @@ int qemuMonitorCreateSnapshot(qemuMonitorPtr mon, const char *name)
 {
     int ret;
 
-    VIR_DEBUG("mon=%p, name=%s",mon,name);
+    VIR_DEBUG("mon=%p, name=%s", mon, name);
 
     if (!mon) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
@@ -3059,7 +3059,7 @@ int qemuMonitorLoadSnapshot(qemuMonitorPtr mon, const char *name)
 {
     int ret;
 
-    VIR_DEBUG("mon=%p, name=%s",mon,name);
+    VIR_DEBUG("mon=%p, name=%s", mon, name);
 
     if (!mon) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
@@ -3078,7 +3078,7 @@ int qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name)
 {
     int ret;
 
-    VIR_DEBUG("mon=%p, name=%s",mon,name);
+    VIR_DEBUG("mon=%p, name=%s", mon, name);
 
     if (!mon) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
@@ -3276,7 +3276,7 @@ int qemuMonitorScreendump(qemuMonitorPtr mon,
     VIR_DEBUG("mon=%p, file=%s", mon, file);
 
     if (!mon) {
-        virReportError(VIR_ERR_INVALID_ARG,"%s",
+        virReportError(VIR_ERR_INVALID_ARG, "%s",
                        _("monitor must not be NULL"));
         return -1;
     }