Date: Thu, 23 Feb 2017 15:05:02 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314140 - head/usr.sbin/camdd Message-ID: <201702231505.v1NF52cE015743@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702231505.v1NF52cE015743>