Skip to content

Commit 90897a9

Browse files
committed
test(pthread): fixed test-case overflow calc issue
1 parent fd7d9c9 commit 90897a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/pthread/test_apps/pthread_unity_tests/main/test_pthread_semaphore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ TEST_CASE("sem_timedwait wait on locked semaphore (timeout)", "[semaphore]")
311311
abstime.tv_nsec = abstime.tv_nsec + 20000000;
312312
if (abstime.tv_nsec >= 1000000000) {
313313
abstime.tv_sec = abstime.tv_sec + 1;
314-
abstime.tv_sec = abstime.tv_nsec % 1000000000;
314+
abstime.tv_nsec = abstime.tv_nsec % 1000000000;
315315
}
316316

317317
TEST_ASSERT_EQUAL_INT(-1, sem_timedwait(&semaphore, &abstime));

0 commit comments

Comments
 (0)