diff --git a/rmw_zenoh_cpp/src/detail/liveliness_utils.cpp b/rmw_zenoh_cpp/src/detail/liveliness_utils.cpp index a2aef62e..db93ec3f 100644 --- a/rmw_zenoh_cpp/src/detail/liveliness_utils.cpp +++ b/rmw_zenoh_cpp/src/detail/liveliness_utils.cpp @@ -192,7 +192,7 @@ std::optional keyexpr_to_qos(const std::string & keyexpr) // Get the history depth. errno = 0; char * endptr; - int64_t num = strtol(history_parts[1].c_str(), &endptr, 10); + unsigned long num = strtoul(history_parts[1].c_str(), &endptr, 10); if (endptr == history_parts[1].c_str()) { // No values were converted, this is an error RMW_SET_ERROR_MSG("no valid numbers available");