Date: Mon, 21 May 2018 18:59:35 +0000 (UTC) From: "Kenneth D. Merry" <ken@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r333991 - stable/11/sys/dev/ocs_fc Message-ID: <201805211859.w4LIxZCh041371@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ken Date: Mon May 21 18:59:34 2018 New Revision: 333991 URL: https://svnweb.freebsd.org/changeset/base/333991 Log: 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) Modified: stable/11/sys/dev/ocs_fc/ocs_os.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ocs_fc/ocs_os.c ============================================================================== --- stable/11/sys/dev/ocs_fc/ocs_os.c Mon May 21 18:41:16 2018 (r333990) +++ stable/11/sys/dev/ocs_fc/ocs_os.c Mon May 21 18:59:34 2018 (r333991) @@ -630,7 +630,7 @@ ocs_thread_create(ocs_os_handle_t os, ocs_thread_t *th { int32_t rc = 0; - ocs_memset(thread, 0, sizeof(thread)); + ocs_memset(thread, 0, sizeof(*thread)); thread->fctn = fctn; thread->name = ocs_strdup(name);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805211859.w4LIxZCh041371>