Author: pfg Date: Tue Apr 26 01:19:36 2016 New Revision: 298601 URL: https://svnweb.freebsd.org/changeset/base/298601
Log: libstand: make more use of the howmany() macro when available. We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Modified: head/lib/libstand/nandfs.c Modified: head/lib/libstand/nandfs.c ============================================================================== --- head/lib/libstand/nandfs.c Tue Apr 26 01:17:05 2016 (r298600) +++ head/lib/libstand/nandfs.c Tue Apr 26 01:19:36 2016 (r298601) @@ -1017,7 +1017,7 @@ ioread(struct open_file *f, off_t pos, v off = pos % bsize; pos /= bsize; - nsec = (length + (bsize - 1)) / bsize; + nsec = howmany(length, bsize); NANDFS_DEBUG("pos=%lld length=%d off=%d nsec=%d\n", pos, length, off, nsec); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"