Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libunwind Avoid negative shift.



details:   https://anonhg.NetBSD.org/src/rev/38c9c1f491ff
branches:  trunk
changeset: 827549:38c9c1f491ff
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 02 16:09:33 2017 +0000

description:
Avoid negative shift.

diffstat:

 sys/lib/libunwind/AddressSpace.hpp |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 2c0f9ac5c911 -r 38c9c1f491ff sys/lib/libunwind/AddressSpace.hpp
--- a/sys/lib/libunwind/AddressSpace.hpp        Thu Nov 02 15:28:23 2017 +0000
+++ b/sys/lib/libunwind/AddressSpace.hpp        Thu Nov 02 16:09:33 2017 +0000
@@ -140,7 +140,7 @@
     } while (byte >= 0x80);
     // sign extend negative numbers
     if ((byte & 0x40) != 0)
-      result |= (-1LL) << bit;
+      result |= (~0ULL) << bit;
     return result;
   }
 



Home | Main Index | Thread Index | Old Index