aboutsummaryrefslogtreecommitdiff
path: root/qom/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'qom/object.c')
-rw-r--r--qom/object.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/qom/object.c b/qom/object.c
index 4e5b2ecacd..58a6ec9b1b 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -2802,38 +2802,27 @@ object_property_add_alias(Object *obj, const char *name,
}
object_property_set_description(obj, op->name,
- target_prop->description,
- &error_abort);
+ target_prop->description);
return op;
}
void object_property_set_description(Object *obj, const char *name,
- const char *description, Error **errp)
+ const char *description)
{
ObjectProperty *op;
- op = object_property_find(obj, name, errp);
- if (!op) {
- return;
- }
-
+ op = object_property_find(obj, name, &error_abort);
g_free(op->description);
op->description = g_strdup(description);
}
void object_class_property_set_description(ObjectClass *klass,
const char *name,
- const char *description,
- Error **errp)
+ const char *description)
{
ObjectProperty *op;
op = g_hash_table_lookup(klass->properties, name);
- if (!op) {
- error_setg(errp, "Property '.%s' not found", name);
- return;
- }
-
g_free(op->description);
op->description = g_strdup(description);
}