From dfa1f7b6d9f4876148d3f2a71cdc890ae98051bc Mon Sep 17 00:00:00 2001 From: "Jesse F. Williamson" Date: Thu, 27 Feb 2025 11:08:22 -0800 Subject: [PATCH] use ceph::parse<> for long ints Signed-off-by: Jesse F. Williamson --- src/common/ceph_json.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ceph_json.h b/src/common/ceph_json.h index 547076d46503d..b85b3a28368b9 100644 --- a/src/common/ceph_json.h +++ b/src/common/ceph_json.h @@ -323,7 +323,7 @@ void decode_json_obj(IntegerT& val, JSONObj *obj) { auto r = ceph::parse(obj->get_data()); - if(std::errc() != r) + if(!r) throw JSONDecoder::err(fmt::format("failed to parse number from JSON")); val = *r; -- 2.39.5