1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00

camdd(8): double assignment.

Why do a calculation twice when you can do it just once.

Found with: coccinelle (da.cocci)
This commit is contained in:
Pedro F. Giffuni 2017-02-23 15:05:01 +00:00
parent adbb8a93d6
commit 95c10b8fa0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314140

View File

@ -3107,10 +3107,6 @@ camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io,
(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;