projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61feeec
)
1999-09-12 Donn Terry <donn@interix.com>
author
Ian Lance Taylor
<ian@airs.com>
Sun, 12 Sep 1999 14:27:21 +0000
(14:27 +0000)
committer
Ian Lance Taylor
<ian@airs.com>
Sun, 12 Sep 1999 14:27:21 +0000
(14:27 +0000)
* libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
significant bit is set.
bfd/ChangeLog
patch
|
blob
|
history
bfd/libbfd.c
patch
|
blob
|
history
diff --git
a/bfd/ChangeLog
b/bfd/ChangeLog
index bf74059a7ef5a5157bb75fd3f5e4f005395e2015..7d00945bc22edc5261419dc2e170157215bf8b2a 100644
(file)
--- a/
bfd/ChangeLog
+++ b/
bfd/ChangeLog
@@
-1,3
+1,8
@@
+1999-09-12 Donn Terry <donn@interix.com>
+
+ * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
+ significant bit is set.
+
1999-09-11 Ian Lance Taylor <ian@zembu.com>
* coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
diff --git
a/bfd/libbfd.c
b/bfd/libbfd.c
index d2baa5b3a2c927cd9739a1db7f2404946dc95633..9620cda70686d7688e92d64fa9a4510cfae0adcf 100644
(file)
--- 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;
}