buflib: enable all paranoia checks

Since allocation is infrequent in Rockbox enabling the extra
checks to catch memory corruption is probably worth the time
and code size cost.

Change-Id: If0d701421054328c57b69e4d0af30759d799d158
This commit is contained in:
Aidan MacDonald 2022-03-30 21:20:02 +01:00
parent 8f896b14d3
commit 88b21731fc

View file

@ -103,7 +103,9 @@
#define PARANOIA_CHECK_BLOCK_HANDLE (1 << 2)
#define PARANOIA_CHECK_CRC (1 << 3)
/* Bitmask of enabled paranoia checks */
#define BUFLIB_PARANOIA 0
#define BUFLIB_PARANOIA \
(PARANOIA_CHECK_LENGTH | PARANOIA_CHECK_HANDLE | \
PARANOIA_CHECK_BLOCK_HANDLE | PARANOIA_CHECK_CRC)
#if BUFLIB_PARANOIA & PARANOIA_CHECK_CRC
# define BUFLIB_HAS_CRC