path: root/sys/fs/ext2fs/ext2_balloc.c
diff options
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_balloc.c
parentd9006e5951a0cd6445cf2fbbbb27b92038972daf (diff)
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: svn path=/head/; revision=251677
Diffstat (limited to 'sys/fs/ext2fs/ext2_balloc.c')
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/fs/ext2fs/ext2_balloc.c b/sys/fs/ext2fs/ext2_balloc.c
index ce73840c407c..81e2d3c46a91 100644
--- a/sys/fs/ext2fs/ext2_balloc.c
+++ b/sys/fs/ext2fs/ext2_balloc.c
@@ -60,11 +60,11 @@ ext2_balloc(struct inode *ip, int32_t lbn, int size, struct ucred *cred,
struct m_ext2fs *fs;
struct ext2mount *ump;
- int32_t nb;
struct buf *bp, *nbp;
struct vnode *vp = ITOV(ip);
struct indir indirs[NIADDR + 2];
- uint32_t newb, *bap, pref;
+ uint32_t nb, newb;
+ int32_t *bap, pref;
int osize, nsize, num, i, error;
*bpp = NULL;
@@ -165,8 +165,8 @@ ext2_balloc(struct inode *ip, int32_t lbn, int size, struct ucred *cred,
pref = ext2_blkpref(ip, lbn, indirs[0].in_off +
EXT2_NDIR_BLOCKS, &ip->i_db[0], 0);
- if ((error = ext2_alloc(ip, lbn, pref,
- (int)fs->e2fs_bsize, cred, &newb)))
+ if ((error = ext2_alloc(ip, lbn, pref, fs->e2fs_bsize, cred,
+ &newb)))
return (error);
nb = newb;
bp = getblk(vp, indirs[1].in_lbn, fs->e2fs_bsize, 0, 0, 0);