summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/ffs.c
diff options
context:
space:
mode:
authorderaadt <>2003-06-11 21:08:16 +0000
committerderaadt <>2003-06-11 21:08:16 +0000
commit05ebc6b11cf74e0e9e901f2e1c26d0d682c57842 (patch)
tree0ab503c1cf313bdf01aa32f8ffd0938a3d19c2a9 /src/lib/libc/string/ffs.c
parent9b3b34e9713b6e433e3bb19fc1808375d5c69917 (diff)
downloadopenbsd-05ebc6b11cf74e0e9e901f2e1c26d0d682c57842.tar.gz
openbsd-05ebc6b11cf74e0e9e901f2e1c26d0d682c57842.tar.bz2
openbsd-05ebc6b11cf74e0e9e901f2e1c26d0d682c57842.zip
ansification; pval ok
Diffstat (limited to 'src/lib/libc/string/ffs.c')
-rw-r--r--src/lib/libc/string/ffs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libc/string/ffs.c b/src/lib/libc/string/ffs.c
index 887ce437d4..f1d14096a2 100644
--- a/src/lib/libc/string/ffs.c
+++ b/src/lib/libc/string/ffs.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ffs.c,v 1.5 2000/07/02 03:10:38 mickey Exp $ */ 1/* $OpenBSD: ffs.c,v 1.6 2003/06/11 21:08:16 deraadt Exp $ */
2 2
3/* 3/*
4 * Public domain. 4 * Public domain.
@@ -6,7 +6,7 @@
6 */ 6 */
7 7
8#if defined(LIBC_SCCS) && !defined(lint) 8#if defined(LIBC_SCCS) && !defined(lint)
9static char *rcsid = "$OpenBSD: ffs.c,v 1.5 2000/07/02 03:10:38 mickey Exp $"; 9static char *rcsid = "$OpenBSD: ffs.c,v 1.6 2003/06/11 21:08:16 deraadt Exp $";
10#endif /* LIBC_SCCS and not lint */ 10#endif /* LIBC_SCCS and not lint */
11 11
12#if !defined(_KERNEL) && !defined(_STANDALONE) 12#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -19,11 +19,10 @@ static char *rcsid = "$OpenBSD: ffs.c,v 1.5 2000/07/02 03:10:38 mickey Exp $";
19 * ffs -- vax ffs instruction 19 * ffs -- vax ffs instruction
20 */ 20 */
21int 21int
22ffs(mask) 22ffs(int mask)
23 register int mask;
24{ 23{
25 register int bit; 24 int bit;
26 register unsigned int r = mask; 25 unsigned int r = mask;
27 static const signed char t[16] = { 26 static const signed char t[16] = {
28 -28, 1, 2, 1, 27 -28, 1, 2, 1,
29 3, 1, 2, 1, 28 3, 1, 2, 1,