device-mapper-multipath/SOURCES/0005-libmultipath-constify-get_unaligned_be.patch

35 lines
1.0 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Wed, 6 Nov 2019 16:49:40 -0600
Subject: [PATCH] libmultipath: constify get_unaligned_be*
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/unaligned.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/unaligned.h b/libmultipath/unaligned.h
index 68c07742..b9eaa7cb 100644
--- a/libmultipath/unaligned.h
+++ b/libmultipath/unaligned.h
@@ -10,14 +10,14 @@ static inline uint16_t get_unaligned_be16(const void *ptr)
return p[0] << 8 | p[1];
}
-static inline uint32_t get_unaligned_be32(void *ptr)
+static inline uint32_t get_unaligned_be32(const void *ptr)
{
const uint8_t *p = ptr;
return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
}
-static inline uint64_t get_unaligned_be64(void *ptr)
+static inline uint64_t get_unaligned_be64(const void *ptr)
{
uint32_t low = get_unaligned_be32(ptr + 4);
uint64_t high = get_unaligned_be32(ptr);
--
2.17.2