Skip to content

Commit

Permalink
timespec_cmp: assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jul 8, 2023
1 parent e5186ce commit f748c82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/timeutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ assert_normalized(const struct timespec *a)
int
timespec_cmp(const struct timespec *a, const struct timespec *b)
{
assert_normalized(a);
assert_normalized(b);
if (a->tv_sec == b->tv_sec) {
if (a->tv_nsec == b->tv_nsec) {
return 0;
Expand Down

0 comments on commit f748c82

Please sign in to comment.