Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IC - 20200226 #361

Merged
merged 3 commits into from
Feb 28, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/os/posix/osapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,8 @@ int32 OS_BinSemCreate_Impl (uint32 sem_id, uint32 initial_value, uint32 options)
mutex_created = 0;
cond_created = 0;
sem = &OS_impl_bin_sem_table[sem_id];
memset(sem, 0, sizeof (*sem));

do
{
/*
Expand Down Expand Up @@ -1522,7 +1524,6 @@ int32 OS_BinSemCreate_Impl (uint32 sem_id, uint32 initial_value, uint32 options)
** fill out the proper OSAL table fields
*/

memset(sem, 0, sizeof (*sem));
sem->current_value = initial_value;

return_code = OS_SUCCESS;
Expand Down