From ffd776502f499178269525586c6812e79e7826ff Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 10 Oct 1994 01:04:55 +0000 Subject: Cosmetics. make gcc less noisy. Still some way to go here. --- sys/ufs/ffs/ffs_balloc.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'sys/ufs/ffs/ffs_balloc.c') 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 @@ -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); } -- cgit v1.1