hexDump: Add const to the buf parameter in hexDump. (#9944)

The function only reads the buffer, so marking it const clarifies intent
and prevents accidental modification.
This commit is contained in:
fw190d13
2026-03-19 12:13:34 +01:00
committed by GitHub
parent 2ef09d17b9
commit 9f74fc11de
2 changed files with 2 additions and 2 deletions

View File

@@ -345,7 +345,7 @@ void RedirectablePrint::log(const char *logLevel, const char *format, ...)
return;
}
void RedirectablePrint::hexDump(const char *logLevel, unsigned char *buf, uint16_t len)
void RedirectablePrint::hexDump(const char *logLevel, const unsigned char *buf, uint16_t len)
{
const char alphabet[17] = "0123456789abcdef";
log(logLevel, " +------------------------------------------------+ +----------------+");