From cf4091b352d0afb6ce620bec6106ee4cbe70856b Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Thu, 21 Oct 2021 22:20:52 -0400 Subject: [PATCH] endian: fix uint16_t specialization of le_to_cpu Fortunately, we have not had cause to read any 16-bit fields out of btrfs structures yet. Signed-off-by: Zygo Blaxell --- include/crucible/endian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/crucible/endian.h b/include/crucible/endian.h index e4ca7eb..589bbaa 100644 --- a/include/crucible/endian.h +++ b/include/crucible/endian.h @@ -28,7 +28,7 @@ namespace crucible { }; template<> struct le_to_cpu_helper { - uint16_t operator()(const uint16_t v) { return le64toh(v); } + uint16_t operator()(const uint16_t v) { return le16toh(v); } }; template<> struct le_to_cpu_helper {