Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Sep 2011 00:43:29 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225428 - head/sys/dev/mfi
Message-ID:  <201109070043.p870hTxb008122@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Wed Sep  7 00:43:28 2011
New Revision: 225428
URL: http://svn.freebsd.org/changeset/base/225428

Log:
  Shorten a variable access some using a cached value rather than
  casting the input argument again, making the code more readable.
  
  Reviewed by:	jhb
  MFC after:	2 weeks
  Approved by:	re (kib)

Modified:
  head/sys/dev/mfi/mfi.c

Modified: head/sys/dev/mfi/mfi.c
==============================================================================
--- head/sys/dev/mfi/mfi.c	Wed Sep  7 00:16:36 2011	(r225427)
+++ head/sys/dev/mfi/mfi.c	Wed Sep  7 00:43:28 2011	(r225428)
@@ -2132,8 +2132,7 @@ mfi_ioctl(struct cdev *dev, u_long cmd, 
 
 		if (ioc->mfi_sense_len) {
 			/* get user-space sense ptr then copy out sense */
-			bcopy(&((struct mfi_ioc_packet*)arg)
-			    ->mfi_frame.raw[ioc->mfi_sense_off],
+			bcopy(&ioc->mfi_frame.raw[ioc->mfi_sense_off],
 			    &sense_ptr.sense_ptr_data[0],
 			    sizeof(sense_ptr.sense_ptr_data));
 #ifdef __amd64__



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109070043.p870hTxb008122>