Skip to content

Commit 07b4d3a

Browse files
tagunilfabiobaltieri
authored andcommitted
posix: clock: partially reformat __z_clock_nanosleep
Apply clang-format to the offending lines to make it happy. Signed-off-by: Ilya Tagunov <[email protected]>
1 parent 4c56eb6 commit 07b4d3a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/posix/options/clock.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,9 @@ static int __z_clock_nanosleep(clockid_t clock_id, int flags, const struct times
216216
return -1;
217217
}
218218

219-
if ((flags & TIMER_ABSTIME) == 0 &&
220-
unlikely(rqtp->tv_sec >= ULLONG_MAX / NSEC_PER_SEC)) {
221-
222-
ns = rqtp->tv_nsec + NSEC_PER_SEC
223-
+ (uint64_t)k_sleep(K_SECONDS(rqtp->tv_sec - 1)) * NSEC_PER_MSEC;
219+
if ((flags & TIMER_ABSTIME) == 0 && unlikely(rqtp->tv_sec >= ULLONG_MAX / NSEC_PER_SEC)) {
220+
ns = rqtp->tv_nsec + NSEC_PER_SEC +
221+
(uint64_t)k_sleep(K_SECONDS(rqtp->tv_sec - 1)) * NSEC_PER_MSEC;
224222
} else {
225223
ns = (uint64_t)rqtp->tv_sec * NSEC_PER_SEC + rqtp->tv_nsec;
226224
}

0 commit comments

Comments
 (0)