summaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2013-11-02 00:08:18 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2013-11-02 00:08:18 +0000
commit10969930464b06a8261f0bed5677855450bd5e46 (patch)
treed2fa88ce12193f05057a59815fbe32345ea21162 /sys/ufs
parent76809e136c7557e5b308e6d5cebe1f037fc3f73b (diff)
No need to cast constants or simple variables to (daddr_t). Use
(u_int64_t) instead of (daddr_t) when casting a variable in an expression passed to DL_SETDSIZE(). Change a variable counting open files from daddr_t to int64_t. ok deraadt@ with the tweak to fix that pesky expression.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ext2fs/ext2fs_subr.c4
-rw-r--r--sys/ufs/ffs/ffs_inode.c5
-rw-r--r--sys/ufs/ffs/ffs_subr.c4
3 files changed, 6 insertions, 7 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_subr.c b/sys/ufs/ext2fs/ext2fs_subr.c
index 6374d40dee3..c0f3ba18fbf 100644
--- a/sys/ufs/ext2fs/ext2fs_subr.c
+++ b/sys/ufs/ext2fs/ext2fs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_subr.c,v 1.29 2013/11/01 17:36:19 krw Exp $ */
+/* $OpenBSD: ext2fs_subr.c,v 1.30 2013/11/02 00:08:17 krw Exp $ */
/* $NetBSD: ext2fs_subr.c,v 1.1 1997/06/11 09:34:03 bouyer Exp $ */
/*
@@ -115,7 +115,7 @@ ext2fs_checkoverlap(struct buf *bp, struct inode *ip)
if (ep == bp || (ep->b_flags & B_INVAL) ||
ep->b_vp == NULLVP)
continue;
- if (VOP_BMAP(ep->b_vp, (daddr_t)0, &vp, NULL, NULL))
+ if (VOP_BMAP(ep->b_vp, 0, &vp, NULL, NULL))
continue;
if (vp != ip->i_devvp)
continue;
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index b32906f680e..d086fd03127 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_inode.c,v 1.64 2013/06/11 16:42:18 deraadt Exp $ */
+/* $OpenBSD: ffs_inode.c,v 1.65 2013/11/02 00:08:17 krw Exp $ */
/* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */
/*
@@ -565,8 +565,7 @@ ffs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn,
continue;
if (level > SINGLE) {
error = ffs_indirtrunc(ip, nlbn, fsbtodb(fs, nb),
- (daddr_t)-1, level - 1,
- &blkcount);
+ -1, level - 1, &blkcount);
if (error)
allerror = error;
blocksreleased += blkcount;
diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c
index 7f5aab936bb..c075f1e633e 100644
--- a/sys/ufs/ffs/ffs_subr.c
+++ b/sys/ufs/ffs/ffs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_subr.c,v 1.28 2013/11/01 17:36:19 krw Exp $ */
+/* $OpenBSD: ffs_subr.c,v 1.29 2013/11/02 00:08:17 krw Exp $ */
/* $NetBSD: ffs_subr.c,v 1.6 1996/03/17 02:16:23 christos Exp $ */
/*
@@ -133,7 +133,7 @@ ffs_checkoverlap(struct buf *bp, struct inode *ip)
if (ep == bp || (ep->b_flags & B_INVAL) ||
ep->b_vp == NULLVP)
continue;
- if (VOP_BMAP(ep->b_vp, (daddr_t)0, &vp, NULL, NULL))
+ if (VOP_BMAP(ep->b_vp, 0, &vp, NULL, NULL))
continue;
if (vp != ip->i_devvp)
continue;