aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/libbfd.c')
-rw-r--r--bfd/libbfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index d2baa5b..9620cda 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -1260,7 +1260,7 @@ bfd_log2 (x)
{
unsigned int result = 0;
- while ((((bfd_vma) 1) << result) < x)
+ while ((x = (x >> 1)) != 0)
++result;
return result;
}