From 788ac3760436229442160c1dce47d0e6acefe30c Mon Sep 17 00:00:00 2001 From: Japroz Saini Date: Sun, 7 Jan 2024 17:11:47 -0500 Subject: [PATCH] (#2465) use u8 instead of char --- Svc/FramingProtocol/FprimeProtocol.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Svc/FramingProtocol/FprimeProtocol.cpp b/Svc/FramingProtocol/FprimeProtocol.cpp index 6639e7d933..459f190406 100644 --- a/Svc/FramingProtocol/FprimeProtocol.cpp +++ b/Svc/FramingProtocol/FprimeProtocol.cpp @@ -62,7 +62,7 @@ bool FprimeDeframing::validate(Types::CircularBuffer& ring, U32 size) { // Initialize the checksum and loop through all bytes calculating it hash.init(); for (U32 i = 0; i < size; i++) { - char byte; + U8 byte; const Fw::SerializeStatus status = ring.peek(byte, i); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); hash.update(&byte, 1); @@ -70,8 +70,8 @@ bool FprimeDeframing::validate(Types::CircularBuffer& ring, U32 size) { hash.final(hashBuffer); // Now loop through the hash digest bytes and check for equality for (U32 i = 0; i < HASH_DIGEST_LENGTH; i++) { - char calc = static_cast(hashBuffer.getBuffAddr()[i]); - char sent = 0; + U8 calc = static_cast(hashBuffer.getBuffAddr()[i]); + U8 sent = 0; const Fw::SerializeStatus status = ring.peek(sent, size + i); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); if (calc != sent) {