diff options
author | phk <phk@FreeBSD.org> | 1994-10-10 01:04:55 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1994-10-10 01:04:55 +0000 |
commit | ffd776502f499178269525586c6812e79e7826ff (patch) | |
tree | a114c3dc4379225460ebb96756930f0be4a5d67a /sys/ufs/ffs/ffs_balloc.c | |
parent | 6a85edd14bf785a7c46ddd16e63a958685507c88 (diff) | |
download | FreeBSD-src-ffd776502f499178269525586c6812e79e7826ff.zip FreeBSD-src-ffd776502f499178269525586c6812e79e7826ff.tar.gz |
Cosmetics. make gcc less noisy. Still some way to go here.
Diffstat (limited to 'sys/ufs/ffs/ffs_balloc.c')
-rw-r--r-- | sys/ufs/ffs/ffs_balloc.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index de51704..fbbbc43 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_balloc.c 8.4 (Berkeley) 9/23/93 - * $Id$ + * $Id: ffs_balloc.c,v 1.3 1994/08/02 07:54:18 davidg Exp $ */ #include <sys/param.h> @@ -159,7 +159,8 @@ ffs_balloc(ip, bn, size, cred, bpp, flags) * Determine the number of levels of indirection. */ pref = 0; - if (error = ufs_getlbns(vp, bn, indirs, &num)) + error = ufs_getlbns(vp, bn, indirs, &num); + if (error) return(error); #ifdef DIAGNOSTIC if (num < 1) @@ -172,8 +173,9 @@ ffs_balloc(ip, bn, size, cred, bpp, flags) nb = ip->i_ib[indirs[0].in_off]; if (nb == 0) { pref = ffs_blkpref(ip, lbn, 0, (daddr_t *)0); - if (error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, - cred, &newb)) + error = ffs_alloc(ip, lbn, pref, + (int)fs->fs_bsize, cred, &newb); + if (error) return (error); nb = newb; bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0); @@ -183,7 +185,8 @@ ffs_balloc(ip, bn, size, cred, bpp, flags) * Write synchronously so that indirect blocks * never point at garbage. */ - if (error = bwrite(bp)) { + error = bwrite(bp); + if (error) { ffs_blkfree(ip, nb, fs->fs_bsize); return (error); } @@ -211,8 +214,9 @@ ffs_balloc(ip, bn, size, cred, bpp, flags) } if (pref == 0) pref = ffs_blkpref(ip, lbn, 0, (daddr_t *)0); - if (error = - ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred, &newb)) { + error = + ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred, &newb); + if (error) { brelse(bp); return (error); } @@ -224,7 +228,8 @@ ffs_balloc(ip, bn, size, cred, bpp, flags) * Write synchronously so that indirect blocks * never point at garbage. */ - if (error = bwrite(nbp)) { + error = bwrite(nbp); + if (error) { ffs_blkfree(ip, nb, fs->fs_bsize); brelse(bp); return (error); @@ -245,8 +250,9 @@ ffs_balloc(ip, bn, size, cred, bpp, flags) */ if (nb == 0) { pref = ffs_blkpref(ip, lbn, indirs[i].in_off, &bap[0]); - if (error = ffs_alloc(ip, - lbn, pref, (int)fs->fs_bsize, cred, &newb)) { + error = ffs_alloc(ip, + lbn, pref, (int)fs->fs_bsize, cred, &newb); + if (error) { brelse(bp); return (error); } |