summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-05-01 02:24:05 +0000
committerpfg <pfg@FreeBSD.org>2016-05-01 02:24:05 +0000
commit99c72370d143d76721d8a3da55177b362925bac6 (patch)
tree40e161dbc2a5b51098c923f7ba5378838673b0f2 /sbin/fsck_ffs
parent212ce360b69cebcd06dfe2e5569bd3bbd96fb734 (diff)
downloadFreeBSD-src-99c72370d143d76721d8a3da55177b362925bac6.zip
FreeBSD-src-99c72370d143d76721d8a3da55177b362925bac6.tar.gz
sbin: ake use of our rounddown() macro when sys/param.h is available.
No functional change.
Diffstat (limited to 'sbin/fsck_ffs')
-rw-r--r--sbin/fsck_ffs/inode.c2
-rw-r--r--sbin/fsck_ffs/suj.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c
index e938178..bb68d5b 100644
--- a/sbin/fsck_ffs/inode.c
+++ b/sbin/fsck_ffs/inode.c
@@ -293,7 +293,7 @@ ginode(ino_t inumber)
if (pbp != NULL)
pbp->b_flags &= ~B_INUSE;
pbp = getdatablk(iblk, sblock.fs_bsize, BT_INODES);
- startinum = (inumber / INOPB(&sblock)) * INOPB(&sblock);
+ startinum = rounddown(inumber, INOPB(&sblock));
}
if (sblock.fs_magic == FS_UFS1_MAGIC)
return ((union dinode *)
diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c
index 58949c9..b265dfc 100644
--- a/sbin/fsck_ffs/suj.c
+++ b/sbin/fsck_ffs/suj.c
@@ -911,7 +911,7 @@ ino_isat(ino_t parent, off_t diroff, ino_t child, int *mode, int *isdot)
* certain we hit a valid record and not some junk in the middle
* of a file name. Stop when we reach or pass the expected offset.
*/
- dpoff = (doff / DIRBLKSIZ) * DIRBLKSIZ;
+ dpoff = rounddown(doff, DIRBLKSIZ);
do {
dp = (struct direct *)&block[dpoff];
if (dpoff == doff)
OpenPOWER on IntegriCloud