aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/ext2fs/ext2_alloc.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2013-06-13 03:23:24 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2013-06-13 03:23:24 +0000
commitf744956b4a21ea500f458a1dbfc5a41f4ef87ee1 (patch)
tree338fd538fab6f05a753e9a36d9947c371209b2c8 /sys/fs/ext2fs/ext2_alloc.c
parentd9006e5951a0cd6445cf2fbbbb27b92038972daf (diff)
downloadsrc-f744956b4a21ea500f458a1dbfc5a41f4ef87ee1.tar.gz
src-f744956b4a21ea500f458a1dbfc5a41f4ef87ee1.zip
Relax some unnecessary unsigned type changes in ext2fs.
While the changes in r245820 are in line with the ext2 spec, the code derived from UFS can use negative values so it is better to relax some types to keep them as they were, and somewhat more similar to UFS. While here clean some casts. Some of the original types are still wrong and will require more work. Discussed with: bde MFC after: 3 days
Notes
Notes: svn path=/head/; revision=251677
Diffstat (limited to 'sys/fs/ext2fs/ext2_alloc.c')
-rw-r--r--sys/fs/ext2fs/ext2_alloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c
index 3bd5f3a3bbe1..15b8354bda51 100644
--- a/sys/fs/ext2fs/ext2_alloc.c
+++ b/sys/fs/ext2fs/ext2_alloc.c
@@ -223,7 +223,7 @@ ext2_reallocblks(struct vop_reallocblks_args *ap)
brelse(sbp);
return (ENOSPC);
}
- sbap = (int32_t *)sbp->b_data;
+ sbap = (u_int *)sbp->b_data;
soff = idp->in_off;
}
/*
@@ -239,7 +239,7 @@ ext2_reallocblks(struct vop_reallocblks_args *ap)
ssize = len - (idp->in_off + 1);
if (bread(vp, idp->in_lbn, (int)fs->e2fs_bsize, NOCRED, &ebp))
goto fail;
- ebap = (int32_t *)ebp->b_data;
+ ebap = (u_int *)ebp->b_data;
}
/*
* Find the preferred location for the cluster.
@@ -442,10 +442,10 @@ ext2_dirpref(struct inode *pip)
{
struct m_ext2fs *fs;
int cg, prefcg, dirsize, cgsize;
- int avgifree, avgbfree, avgndir, curdirsize;
- int minifree, minbfree, maxndir;
- int mincg, minndir;
- int maxcontigdirs;
+ u_int avgifree, avgbfree, avgndir, curdirsize;
+ u_int minifree, minbfree, maxndir;
+ u_int mincg, minndir;
+ u_int maxcontigdirs;
mtx_assert(EXT2_MTX(pip->i_ump), MA_OWNED);
fs = pip->i_e2fs;