Print this page
XXXX ffs(3c) manpage is a little confusing

*** 16,36 **** int fls(int i); int flsl(long i); ! int flsl(long long i); DESCRIPTION The ffs(), ffsl(), and ffsll() functions finds the first bit set (beginning with the least significant bit) and return the index of that bit. Bits are numbered starting at one (the least significant bit). The fls(), flsl(), and flsll() functions find the last bit set ! (beginning with the most significant bit) and return the index of that bit. Bits are numbered starting at one (the least significant bit). RETURN VALUES The ffs(), ffsl(), and ffsll() functions returns the index of the first bit set. If i is 0, then they return 0. --- 16,36 ---- int fls(int i); int flsl(long i); ! int flsll(long long i); DESCRIPTION The ffs(), ffsl(), and ffsll() functions finds the first bit set (beginning with the least significant bit) and return the index of that bit. Bits are numbered starting at one (the least significant bit). The fls(), flsl(), and flsll() functions find the last bit set ! (beginning with the least significant bit) and return the index of that bit. Bits are numbered starting at one (the least significant bit). RETURN VALUES The ffs(), ffsl(), and ffsll() functions returns the index of the first bit set. If i is 0, then they return 0.
*** 59,64 **** SEE ALSO attributes(5), standards(5) ! July 24, 2002 FFS(3C) --- 59,64 ---- SEE ALSO attributes(5), standards(5) ! May 21, 2015 FFS(3C)