diff mbox series

[17/20] colo-compare: Remove unnecessary prefix from error message

Message ID 20201030202131.796967-18-ehabkost@redhat.com
State New
Headers show
Series qdev/qom: Remove explicit type names from error_setg() calls | expand

Commit Message

Eduardo Habkost Oct. 30, 2020, 8:21 p.m. UTC
object_property_parse() will add a
  "Property '<TYPE>.<PROP>' can't take value '<VALUE>'"
prefix automatically for us.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: Zhang Chen <chen.zhang@intel.com>
Cc: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-devel@nongnu.org
---
 net/colo-compare.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/net/colo-compare.c b/net/colo-compare.c
index 3a45d64175..ae61e32c5b 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -1097,8 +1097,7 @@  static void compare_set_timeout(Object *obj, Visitor *v,
         return;
     }
     if (!value) {
-        error_setg(errp, "Property '%s.%s' requires a positive value",
-                   object_get_typename(obj), name);
+        error_setg(errp, "timeout can't be zero");
         return;
     }
     s->compare_timeout = value;
@@ -1125,8 +1124,7 @@  static void compare_set_expired_scan_cycle(Object *obj, Visitor *v,
         return;
     }
     if (!value) {
-        error_setg(errp, "Property '%s.%s' requires a positive value",
-                   object_get_typename(obj), name);
+        error_setg(errp, "expired_scan_cycle can't be zero");
         return;
     }
     s->expired_scan_cycle = value;
@@ -1153,8 +1151,7 @@  static void set_max_queue_size(Object *obj, Visitor *v,
         goto out;
     }
     if (!value) {
-        error_setg(&local_err, "Property '%s.%s' requires a positive value",
-                   object_get_typename(obj), name);
+        error_setg(errp, "queue size can't be zero");
         goto out;
     }
     max_queue_size = value;