From 8f9e448b2ef6db7cd905540c21f3c5b190e7a1e7 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 7 Dec 2025 22:22:16 +0100 Subject: Add bin/true and bin/false implementations - Added assembly implementations for `true` and `false` commands. - Updated Kbuild files to include new binaries. - Removed unused libraries and headers. - Cleaned up makefile and unused code. --- lib/libc/strings/ffsl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/libc/strings/ffsl.c') diff --git a/lib/libc/strings/ffsl.c b/lib/libc/strings/ffsl.c index 2f2e7d44..c84a2905 100644 --- a/lib/libc/strings/ffsl.c +++ b/lib/libc/strings/ffsl.c @@ -1,14 +1,18 @@ int ffsl(long i) { - if (i == 0) - return 0; + int pos; + unsigned long u; - int pos = 1; - unsigned long u = (unsigned long)i; + if (i == 0) { + return 0; + } + pos = 1; + u = (unsigned long)i; while ((u & 1UL) == 0UL) { u >>= 1; pos++; } + return pos; } -- cgit v1.2.3