summaryrefslogtreecommitdiff
path: root/sys/lib/libkern
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-07-02 03:10:39 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-07-02 03:10:39 +0000
commitbb12e108eaaa5a7b8bbaf74b692183d790dd96a9 (patch)
treec616d66ff247e537ed1d800f33eb30c727607fbe /sys/lib/libkern
parent2a9c3ea1c1b901881bd1259b2e689f6012f33737 (diff)
knf; ouch, that hurts
Diffstat (limited to 'sys/lib/libkern')
-rw-r--r--sys/lib/libkern/ffs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/lib/libkern/ffs.c b/sys/lib/libkern/ffs.c
index 1a823fd9d3c..63b3cbfb950 100644
--- a/sys/lib/libkern/ffs.c
+++ b/sys/lib/libkern/ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs.c,v 1.4 2000/07/02 01:03:29 mickey Exp $ */
+/* $OpenBSD: ffs.c,v 1.5 2000/07/02 03:09:44 mickey Exp $ */
/*
* Public domain.
@@ -6,7 +6,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: ffs.c,v 1.4 2000/07/02 01:03:29 mickey Exp $";
+static char *rcsid = "$OpenBSD: ffs.c,v 1.5 2000/07/02 03:09:44 mickey Exp $";
#endif /* LIBC_SCCS and not lint */
#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -28,18 +28,19 @@ ffs(mask)
-28, 1, 2, 1,
3, 1, 2, 1,
4, 1, 2, 1,
- 3, 1, 2, 1 };
+ 3, 1, 2, 1
+ };
bit = 0;
- if (0 == (r & 0xffff)) {
+ if (!(r & 0xffff)) {
bit += 16;
r >>= 16;
}
- if (0 == (r & 0xff)) {
+ if (!(r & 0xff)) {
bit += 8;
r >>= 8;
}
- if (0 == (r & 0xf)) {
+ if (!(r & 0xf)) {
bit += 4;
r >>= 4;
}