Skip to content

Commit

Permalink
Fix assert statement to allow the seconds field of a DDS_Duration_t t…
Browse files Browse the repository at this point in the history
…o be zero (#88)

Signed-off-by: Michael Jeronimo <[email protected]>
  • Loading branch information
Michael Jeronimo authored May 17, 2022
1 parent 325a04e commit 7cc033e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rmw_connextdds_common/src/common/rmw_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ dds_duration_to_rmw_time(const DDS_Duration_t & duration)
if (DDS_Duration_is_infinite(&duration)) {
return RMW_DURATION_INFINITE;
}
assert(duration.sec > 0);
assert(duration.sec >= 0);
rmw_time_t result = {static_cast<uint64_t>(duration.sec), duration.nanosec};
return result;
}
Expand Down

0 comments on commit 7cc033e

Please sign in to comment.