summary refs log tree commit diff stats
path: root/net/colo-compare.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/colo-compare.c')
-rw-r--r--net/colo-compare.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/colo-compare.c b/net/colo-compare.c
index f15779dedc..6835d42363 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -1096,8 +1096,7 @@ static void compare_set_timeout(Object *obj, Visitor *v,
     Error *local_err = NULL;
     uint32_t value;
 
-    visit_type_uint32(v, name, &value, &local_err);
-    if (local_err) {
+    if (!visit_type_uint32(v, name, &value, &local_err)) {
         goto out;
     }
     if (!value) {
@@ -1129,8 +1128,7 @@ static void compare_set_expired_scan_cycle(Object *obj, Visitor *v,
     Error *local_err = NULL;
     uint32_t value;
 
-    visit_type_uint32(v, name, &value, &local_err);
-    if (local_err) {
+    if (!visit_type_uint32(v, name, &value, &local_err)) {
         goto out;
     }
     if (!value) {