Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2015 07:29:07 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277372 - head/sys/cam/scsi
Message-ID:  <201501190729.t0J7T73O050634@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Jan 19 07:29:07 2015
New Revision: 277372
URL: https://svnweb.freebsd.org/changeset/base/277372

Log:
  Minor refactoring of code block.
  
  MFC after:		1 day

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Mon Jan 19 07:24:18 2015	(r277371)
+++ head/sys/cam/scsi/scsi_da.c	Mon Jan 19 07:29:07 2015	(r277372)
@@ -3101,11 +3101,10 @@ dadone(struct cam_periph *periph, union 
 			 * give them an 'illegal' value we'll avoid that
 			 * here.
 			 */
-			if (block_size == 0 && maxsector == 0) {
-				block_size = 512;
-				maxsector = -1;
-			} else if (block_size == 0) {
+			if (block_size == 0) {
 				block_size = 512;
+				if (maxsector == 0)
+					maxsector = -1;
 			}
 			if (block_size >= MAXPHYS) {
 				xpt_print(periph->path,



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