svn commit: r314140 - head/usr.sbin/camdd

Pedro F. Giffuni pfg at FreeBSD.org
Thu Feb 23 15:05:03 UTC 2017


Author: pfg
Date: Thu Feb 23 15:05:01 2017
New Revision: 314140
URL: https://svnweb.freebsd.org/changeset/base/314140

Log:
  camdd(8): double assignment.
  
  Why do a calculation twice when you can do it just once.
  
  Found with: coccinelle (da.cocci)

Modified:
  head/usr.sbin/camdd/camdd.c

Modified: head/usr.sbin/camdd/camdd.c
==============================================================================
--- head/usr.sbin/camdd/camdd.c	Thu Feb 23 14:39:51 2017	(r314139)
+++ head/usr.sbin/camdd/camdd.c	Thu Feb 23 15:05:01 2017	(r314140)
@@ -3107,10 +3107,6 @@ camdd_rw(struct camdd_io_opts *io_opts, 
 			    (devs[i]->start_offset_bytes /
 			    devs[i]->sector_size) +
 			    (max_io / devs[i]->sector_size) - 1;
-			devs[i]->sector_io_limit =
-			    (devs[i]->start_offset_bytes /
-			    devs[i]->sector_size) +
-			    (max_io / devs[i]->sector_size) - 1;
 		}
 
 		devs[i]->next_io_pos_bytes = devs[i]->start_offset_bytes;


More information about the svn-src-head mailing list