From: Jesse F. Williamson Date: Thu, 27 Feb 2025 19:08:22 +0000 (-0800) Subject: use ceph::parse<> for long ints X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=dfa1f7b6d9f4876148d3f2a71cdc890ae98051bc;p=ceph.git use ceph::parse<> for long ints Signed-off-by: Jesse F. Williamson --- 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;