diff options
Diffstat (limited to 'hw/core/qdev-properties.c')
-rw-r--r-- | hw/core/qdev-properties.c | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index ca7771f307..3cb6faa12b 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -125,8 +125,7 @@ static void prop_set_bit(Object *obj, Visitor *v, const char *name, return; } - visit_type_bool(v, name, &value, &local_err); - if (local_err) { + if (!visit_type_bool(v, name, &value, &local_err)) { error_propagate(errp, local_err); return; } @@ -189,8 +188,7 @@ static void prop_set_bit64(Object *obj, Visitor *v, const char *name, return; } - visit_type_bool(v, name, &value, &local_err); - if (local_err) { + if (!visit_type_bool(v, name, &value, &local_err)) { error_propagate(errp, local_err); return; } @@ -486,8 +484,7 @@ static void set_string(Object *obj, Visitor *v, const char *name, return; } - visit_type_str(v, name, &str, &local_err); - if (local_err) { + if (!visit_type_str(v, name, &str, &local_err)) { error_propagate(errp, local_err); return; } @@ -540,8 +537,7 @@ static void set_mac(Object *obj, Visitor *v, const char *name, void *opaque, return; } - visit_type_str(v, name, &str, &local_err); - if (local_err) { + if (!visit_type_str(v, name, &str, &local_err)) { error_propagate(errp, local_err); return; } @@ -762,8 +758,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, const char *name, return; } - visit_type_str(v, name, &str, &local_err); - if (local_err) { + if (!visit_type_str(v, name, &str, &local_err)) { error_free(local_err); local_err = NULL; visit_type_int32(v, name, &value, &local_err); @@ -844,8 +839,7 @@ static void set_size32(Object *obj, Visitor *v, const char *name, void *opaque, return; } - visit_type_size(v, name, &value, &local_err); - if (local_err) { + if (!visit_type_size(v, name, &value, &local_err)) { error_propagate(errp, local_err); return; } @@ -894,8 +888,7 @@ static void set_blocksize(Object *obj, Visitor *v, const char *name, return; } - visit_type_size(v, name, &value, &local_err); - if (local_err) { + if (!visit_type_size(v, name, &value, &local_err)) { error_propagate(errp, local_err); return; } @@ -976,8 +969,7 @@ static void set_pci_host_devaddr(Object *obj, Visitor *v, const char *name, return; } - visit_type_str(v, name, &str, &local_err); - if (local_err) { + if (!visit_type_str(v, name, &str, &local_err)) { error_propagate(errp, local_err); return; } @@ -1076,8 +1068,7 @@ static void set_uuid(Object *obj, Visitor *v, const char *name, void *opaque, return; } - visit_type_str(v, name, &str, &local_err); - if (local_err) { + if (!visit_type_str(v, name, &str, &local_err)) { error_propagate(errp, local_err); return; } @@ -1158,8 +1149,7 @@ static void set_prop_arraylen(Object *obj, Visitor *v, const char *name, name); return; } - visit_type_uint32(v, name, alenptr, &local_err); - if (local_err) { + if (!visit_type_uint32(v, name, alenptr, &local_err)) { error_propagate(errp, local_err); return; } @@ -1490,8 +1480,8 @@ static void set_prop_pcielinkspeed(Object *obj, Visitor *v, const char *name, return; } - visit_type_enum(v, prop->name, &speed, prop->info->enum_table, &local_err); - if (local_err) { + if (!visit_type_enum(v, prop->name, &speed, prop->info->enum_table, + &local_err)) { error_propagate(errp, local_err); return; } @@ -1578,8 +1568,8 @@ static void set_prop_pcielinkwidth(Object *obj, Visitor *v, const char *name, return; } - visit_type_enum(v, prop->name, &width, prop->info->enum_table, &local_err); - if (local_err) { + if (!visit_type_enum(v, prop->name, &width, prop->info->enum_table, + &local_err)) { error_propagate(errp, local_err); return; } |