X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Flog2.c;h=08b27bcf8dc95aedfe70f17a1bdc45c3c8b045dc;hb=997624f88f37bec5cb96cf9fc3b3cac05ccc6ed8;hp=3cd983357d573dd658c58dd99786c1c6099a9812;hpb=a048770f41b23fdba09e2a70a9711f48152e6778;p=libucw.git diff --git a/lib/log2.c b/lib/log2.c index 3cd98335..08b27bcf 100644 --- a/lib/log2.c +++ b/lib/log2.c @@ -1,19 +1,18 @@ /* * Sherlock Library -- Binary Logarithm * - * (c) 1997 Martin Mares, + * (c) 1997 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ -#include - -#include "lib.h" - -#undef log2 +#include "lib/lib.h" int -log2(ulg x) +fls(u32 x) { - ulg l; + uns l; if (!x) return 0;