Clear out the entire structure, not just the size of a pointer to it.

sys/dev/ocs/ocs_os.c:
	In ocs_thread_create(), use sizeof(*thread) (instead of
	sizeof(thread)) as the size argument to memset so that we clear
	out the entire thread structure instead of just a few bytes of it.

Submitted by:	jtl
MFC after:	3 days
This commit is contained in:
Kenneth D. Merry 2018-05-11 14:50:26 +00:00
parent 2b55bea538
commit e440863e06
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333492

View File

@ -630,7 +630,7 @@ ocs_thread_create(ocs_os_handle_t os, ocs_thread_t *thread, ocs_thread_fctn fctn
{
int32_t rc = 0;
ocs_memset(thread, 0, sizeof(thread));
ocs_memset(thread, 0, sizeof(*thread));
thread->fctn = fctn;
thread->name = ocs_strdup(name);