aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-10-18 10:33:30 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-10-18 10:33:30 +0100
commitf525c8a6cb9e445ceef6e73aeccab553866b2f36 (patch)
treec63e2308714d68da383b6fe9b021e5e6e8ac2291 /vl.c
parente8ddc2eae5ccc41f0815e5c43e70cb04a7e67e2e (diff)
parent026ac483c70850c82fad849de656204b16f8415e (diff)
downloadqemu-f525c8a6cb9e445ceef6e73aeccab553866b2f36.zip
qemu-f525c8a6cb9e445ceef6e73aeccab553866b2f36.tar.gz
qemu-f525c8a6cb9e445ceef6e73aeccab553866b2f36.tar.bz2
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging
machine + memory backend queue, 2016-10-17 # gpg: Signature made Mon 17 Oct 2016 18:54:57 BST # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-pull-request: hostmem-file: Register TYPE_MEMORY_BACKEND_FILE properties as class properties hostmem: Register TYPE_MEMORY_BACKEND properties as class properties pc: Register TYPE_PC_MACHINE properties as class properties machine: Register TYPE_MACHINE properties as class properties machine: Fix replacement of '_' by '-' in machine property names Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/vl.c b/vl.c
index 2569ec2..ebd47af 100644
--- a/vl.c
+++ b/vl.c
@@ -2804,17 +2804,16 @@ static int machine_set_property(void *opaque,
{
Object *obj = OBJECT(opaque);
Error *local_err = NULL;
- char *c, *qom_name;
+ char *p, *qom_name;
if (strcmp(name, "type") == 0) {
return 0;
}
qom_name = g_strdup(name);
- c = qom_name;
- while (*c++) {
- if (*c == '_') {
- *c = '-';
+ for (p = qom_name; *p; p++) {
+ if (*p == '_') {
+ *p = '-';
}
}