aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/colo-compare.c20
-rw-r--r--net/dump.c10
-rw-r--r--net/filter-buffer.c10
3 files changed, 16 insertions, 24 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)
diff --git a/net/dump.c b/net/dump.c
index 8c487a5590..f7a302f56c 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -196,17 +196,15 @@ static void filter_dump_set_maxlen(Object *obj, Visitor *v, const char *name,
uint32_t value;
if (!visit_type_uint32(v, name, &value, &local_err)) {
- goto out;
+ error_propagate(errp, local_err);
+ return;
}
if (value == 0) {
- error_setg(&local_err, "Property '%s.%s' doesn't take value '%u'",
+ error_setg(errp, "Property '%s.%s' doesn't take value '%u'",
object_get_typename(obj), name, value);
- goto out;
+ return;
}
nfds->maxlen = value;
-
-out:
- error_propagate(errp, local_err);
}
static char *file_dump_get_filename(Object *obj, Error **errp)
diff --git a/net/filter-buffer.c b/net/filter-buffer.c
index 8e42934b37..143627fcaf 100644
--- a/net/filter-buffer.c
+++ b/net/filter-buffer.c
@@ -174,17 +174,15 @@ static void filter_buffer_set_interval(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->interval = value;
-
-out:
- error_propagate(errp, local_err);
}
static void filter_buffer_init(Object *obj)