Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 May 2018 14:50:27 +0000 (UTC)
From:      "Kenneth D. Merry" <ken@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r333492 - head/sys/dev/ocs_fc
Message-ID:  <201805111450.w4BEoRxt070866@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ken
Date: Fri May 11 14:50:26 2018
New Revision: 333492
URL: https://svnweb.freebsd.org/changeset/base/333492

Log:
  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

Modified:
  head/sys/dev/ocs_fc/ocs_os.c

Modified: head/sys/dev/ocs_fc/ocs_os.c
==============================================================================
--- head/sys/dev/ocs_fc/ocs_os.c	Fri May 11 14:43:21 2018	(r333491)
+++ head/sys/dev/ocs_fc/ocs_os.c	Fri May 11 14:50:26 2018	(r333492)
@@ -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?201805111450.w4BEoRxt070866>