Commit 539c89b8 authored by Stephen Lord's avatar Stephen Lord Committed by Stephen Lord

[XFS] fix up xfs_lowbit's use of ffs

SGI Modid: 2.5.x-xfs:slinx:156655a
parent 9bee259b
...@@ -156,12 +156,12 @@ xfs_lowbit64( ...@@ -156,12 +156,12 @@ xfs_lowbit64(
{ {
int n; int n;
n = ffs((unsigned)v); n = ffs((unsigned)v);
if (n == 0) { if (n <= 0) {
n = ffs(v >> 32); n = ffs(v >> 32);
if (n >= 0) if (n >= 0)
n+=32; n+=32;
} }
return n-1; return (n <= 0) ? n : n-1;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment