summaryrefslogtreecommitdiff
path: root/lib/libc/strings/ffs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/strings/ffs.c')
-rw-r--r--lib/libc/strings/ffs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/strings/ffs.c b/lib/libc/strings/ffs.c
index 3b836021..2c49cf4d 100644
--- a/lib/libc/strings/ffs.c
+++ b/lib/libc/strings/ffs.c
@@ -1,7 +1,8 @@
int ffs(int i)
{
- if (i == 0)
+ if (i == 0) {
return 0;
+ }
int pos = 1;
unsigned int u = (unsigned int)i;
@@ -10,5 +11,6 @@ int ffs(int i)
u >>= 1;
pos++;
}
+
return pos;
}