diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-12-01 19:12:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-12-01 19:12:26 +0000 |
commit | 6f8d43b92f33987e95a242d1c7f458af31938055 (patch) | |
tree | 29373fc26ea1f78250da59dd126bd5222a8a9462 /sys/ufs/ffs | |
parent | afb17db562a8a1e79ce3443e80f84b9bc997e809 (diff) |
KNF
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_subr.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 81c2bd76a38..50916fca74a 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.9 2001/07/06 08:29:29 deraadt Exp $ */ +/* $OpenBSD: ffs_subr.c,v 1.10 2001/12/01 19:12:25 deraadt Exp $ */ /* $NetBSD: ffs_subr.c,v 1.6 1996/03/17 02:16:23 christos Exp $ */ /* @@ -244,23 +244,21 @@ ffs_setblock(fs, cp, h) */ int ffs_isfreeblock(fs, cp, h) - struct fs *fs; - unsigned char *cp; - daddr_t h; + struct fs *fs; + unsigned char *cp; + daddr_t h; { - switch ((int)fs->fs_frag) { - case 8: - return (cp[h] == 0); - case 4: - return ((cp[h >> 1] & (0x0f << ((h & 0x1) << 2))) == 0); - case 2: - return ((cp[h >> 2] & (0x03 << ((h & 0x3) << 1))) == 0); - case 1: - return ((cp[h >> 3] & (0x01 << (h & 0x7))) == 0); - default: - panic("ffs_isfreeblock"); - } + switch ((int)fs->fs_frag) { + case 8: + return (cp[h] == 0); + case 4: + return ((cp[h >> 1] & (0x0f << ((h & 0x1) << 2))) == 0); + case 2: + return ((cp[h >> 2] & (0x03 << ((h & 0x3) << 1))) == 0); + case 1: + return ((cp[h >> 3] & (0x01 << (h & 0x7))) == 0); + default: + panic("ffs_isfreeblock"); + } } - - |