aboutsummaryrefslogtreecommitdiff
path: root/net/colo-compare.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/colo-compare.c')
-rw-r--r--net/colo-compare.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 6835d42363..d75169e28f 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -1097,17 +1097,15 @@ static void compare_set_timeout(Object *obj, Visitor *v,
uint32_t value;
if (!visit_type_uint32(v, name, &value, &local_err)) {
- goto out;
+ error_propagate(errp, local_err);
+ return;
}
if (!value) {
- error_setg(&local_err, "Property '%s.%s' requires a positive value",
+ error_setg(errp, "Property '%s.%s' requires a positive value",
object_get_typename(obj), name);
- goto out;
+ return;
}
s->compare_timeout = value;
-
-out:
- error_propagate(errp, local_err);
}
static void compare_get_expired_scan_cycle(Object *obj, Visitor *v,
@@ -1129,17 +1127,15 @@ static void compare_set_expired_scan_cycle(Object *obj, Visitor *v,
uint32_t value;
if (!visit_type_uint32(v, name, &value, &local_err)) {
- goto out;
+ error_propagate(errp, local_err);
+ return;
}
if (!value) {
- error_setg(&local_err, "Property '%s.%s' requires a positive value",
+ error_setg(errp, "Property '%s.%s' requires a positive value",
object_get_typename(obj), name);
- goto out;
+ return;
}
s->expired_scan_cycle = value;
-
-out:
- error_propagate(errp, local_err);
}
static void compare_pri_rs_finalize(SocketReadState *pri_rs)