aboutsummaryrefslogtreecommitdiff
path: root/contrib/libc++
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-06-01 06:55:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-06-01 06:55:01 +0000
commite3726a671af0b4c791d03db2157d16727f0197ba (patch)
treebebeea14202739be50c83672417f24041a2c04bc /contrib/libc++
parent3e2e1f1f0a88eebee0da9b0fa22f7c15fa41e921 (diff)
downloadsrc-e3726a671af0b4c791d03db2157d16727f0197ba.tar.gz
src-e3726a671af0b4c791d03db2157d16727f0197ba.zip
Fix dangling else in libc++'s __bit_reference header. This has also
been sent upstream. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=236387
Diffstat (limited to 'contrib/libc++')
-rw-r--r--contrib/libc++/include/__bit_reference4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/libc++/include/__bit_reference b/contrib/libc++/include/__bit_reference
index 906b9da462e6..48538a24d512 100644
--- a/contrib/libc++/include/__bit_reference
+++ b/contrib/libc++/include/__bit_reference
@@ -950,11 +950,15 @@ __equal_unaligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true>
__storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r);
__m = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn));
if (__first2.__ctz_ > __first1.__ctz_)
+ {
if ((*__first2.__seg_ & __m) != (__b << (__first2.__ctz_ - __first1.__ctz_)))
return false;
+ }
else
+ {
if ((*__first2.__seg_ & __m) != (__b >> (__first1.__ctz_ - __first2.__ctz_)))
return false;
+ }
__first2.__seg_ += (__ddn + __first2.__ctz_) / __bits_per_word;
__first2.__ctz_ = static_cast<unsigned>((__ddn + __first2.__ctz_) % __bits_per_word);
__dn -= __ddn;