aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/zfs
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-21 19:57:40 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-21 19:57:40 +0000
commitd9c9c81c083a76a65c6cacf8fcbc0511e2ffa489 (patch)
treecd4dfa8859a5f57124d315ff395b524d7587e1ea /sys/boot/zfs
parent5977d3e898348ce714243a4189cee906151aa522 (diff)
downloadsrc-d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489.tar.gz
src-d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489.zip
sys: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
Notes
Notes: svn path=/head/; revision=298433
Diffstat (limited to 'sys/boot/zfs')
-rw-r--r--sys/boot/zfs/zfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/zfs/zfs.c b/sys/boot/zfs/zfs.c
index 059e80a6b771..f5aee2e2f40e 100644
--- a/sys/boot/zfs/zfs.c
+++ b/sys/boot/zfs/zfs.c
@@ -310,7 +310,7 @@ zfs_readdir(struct open_file *f, struct dirent *d)
fzap_next:
chunk = fp->f_seekp & (bsize - 1);
if (chunk == ZAP_LEAF_NUMCHUNKS(&zl)) {
- fp->f_seekp = (fp->f_seekp & ~(bsize - 1)) + bsize;
+ fp->f_seekp = rounddown2(fp->f_seekp, bsize) + bsize;
chunk = 0;
/*