• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From dd49933f80043f933bc10e2f0f1c6d3e664475ed Mon Sep 17 00:00:00 2001
2From: hubin <hubin73@huawei.com>
3Date: Fri, 16 Dec 2022 09:24:50 +0800
4Subject: [PATCH] fix byte_order_is_valid function logic
5
6byte_order_is_valid is an inline function extracted from unw_create_addr_space
7in libunwind 1.6, currently its logic mismatches the function intention.
8
9Signed-off-by: hubin <hubin73@huawei.com>
10---
11 include/libunwind_i.h | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/include/libunwind_i.h b/include/libunwind_i.h
15index fea5c26..9742267 100644
16--- a/include/libunwind_i.h
17+++ b/include/libunwind_i.h
18@@ -119,8 +119,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
19 static inline int
20 byte_order_is_valid(int byte_order)
21 {
22-    return byte_order != UNW_BIG_ENDIAN
23-        && byte_order != UNW_LITTLE_ENDIAN;
24+    return byte_order == UNW_BIG_ENDIAN
25+        || byte_order == UNW_LITTLE_ENDIAN;
26 }
27
28 static inline int
29--
302.33.0
31
32