Deleted Added
full compact
ffsll.c (77117) ffsll.c (86170)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#if defined(LIBC_SCCS) && !defined(lint)
35static char sccsid[] = "@(#)ffs.c 8.1 (Berkeley) 6/4/93";
36#endif /* LIBC_SCCS and not lint */
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#if defined(LIBC_SCCS) && !defined(lint)
35static char sccsid[] = "@(#)ffs.c 8.1 (Berkeley) 6/4/93";
36#endif /* LIBC_SCCS and not lint */
37#ifndef lint
38static const char rcsid[] =
39 "$FreeBSD: head/lib/libc/string/ffs.c 77117 2001-05-24 08:47:42Z obrien $";
40#endif
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/lib/libc/string/ffs.c 86170 2001-11-07 19:55:16Z obrien $");
41
42#include <string.h>
43
44/*
45 * ffs -- vax ffs instruction
46 */
47int
48ffs(mask)
49 register int mask;
50{
51 register int bit;
52
53 if (mask == 0)
54 return(0);
55 for (bit = 1; !(mask & 1); bit++)
56 mask >>= 1;
57 return(bit);
58}
39
40#include <string.h>
41
42/*
43 * ffs -- vax ffs instruction
44 */
45int
46ffs(mask)
47 register int mask;
48{
49 register int bit;
50
51 if (mask == 0)
52 return(0);
53 for (bit = 1; !(mask & 1); bit++)
54 mask >>= 1;
55 return(bit);
56}