]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
use ceph::parse<> for long ints
authorJesse F. Williamson <jfw@ibm.com>
Thu, 27 Feb 2025 19:08:22 +0000 (11:08 -0800)
committerJesse F. Williamson <jfw@ibm.com>
Mon, 17 Mar 2025 17:41:28 +0000 (10:41 -0700)
Signed-off-by: Jesse F. Williamson <jfw@ibm.com>
src/common/ceph_json.h

index 547076d46503d0cd445099772df43aa97a88067c..b85b3a28368b97b8cf1981afcd32bd7e2ff40c15 100644 (file)
@@ -323,7 +323,7 @@ void decode_json_obj(IntegerT& val, JSONObj *obj)
 {
  auto r = ceph::parse<IntegerT>(obj->get_data());
 
- if(std::errc() != r)
+ if(!r)
   throw JSONDecoder::err(fmt::format("failed to parse number from JSON"));
 
  val = *r;