Skip to content

Commit

Permalink
Merge pull request #681 from skliper/fix542-semvaluemax_wrap
Browse files Browse the repository at this point in the history
Fix #542, Avoid UT failure if SEM_VALUE_MAX >= UINT32_MAX
  • Loading branch information
astrogeco authored Dec 18, 2020
2 parents 7586872 + 9a73cb5 commit d32af54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unit-tests/oscore-test/ut_oscore_countsem_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void UT_os_count_sem_create_test()
* The OSAL should define this for itself, but it currently does not.
* (This macro is not currently defined in RTEMS)
*/
#ifdef SEM_VALUE_MAX
#if defined SEM_VALUE_MAX && SEM_VALUE_MAX < UINT32_MAX
res = OS_CountSemCreate(&count_sem_ids[0], "CountSem1", ((uint32)SEM_VALUE_MAX) + 1, 0);
if (res == OS_INVALID_SEM_VALUE)
UT_OS_TEST_RESULT(testDesc, UTASSERT_CASETYPE_PASS);
Expand Down

0 comments on commit d32af54

Please sign in to comment.