From 6a00cfee2564c1cbf584df239e34d72f29fe0721 Mon Sep 17 00:00:00 2001 From: ken Date: Mon, 21 May 2018 18:59:34 +0000 Subject: [PATCH] MFC r333492: ------------------------------------------------------------------------ r333492 | ken | 2018-05-11 08:50:26 -0600 (Fri, 11 May 2018) | 10 lines 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 ------------------------------------------------------------------------ Approved by: re (marius, gjb) --- sys/dev/ocs_fc/ocs_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ocs_fc/ocs_os.c b/sys/dev/ocs_fc/ocs_os.c index c7e881e3123..478bf85da9d 100644 --- a/sys/dev/ocs_fc/ocs_os.c +++ b/sys/dev/ocs_fc/ocs_os.c @@ -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); -- 2.45.0