From d7bbc59607d4b831098290bfef8eae9a983065c8 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier Date: Sat, 22 Oct 2022 06:07:10 +0000 Subject: [PATCH] N64.ino: Remove unused function This does not save any space as the linker noticed it wasn't used. Also, point the (commented-out) only caller to the equivalent libc function. --- Cart_Reader/N64.ino | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Cart_Reader/N64.ino b/Cart_Reader/N64.ino index e2d97ec..aa5feb7 100644 --- a/Cart_Reader/N64.ino +++ b/Cart_Reader/N64.ino @@ -2033,15 +2033,6 @@ void printCartInfo_N64() { } } -// improved strcmp function that ignores case to prevent checksum comparison issues -int strcicmp(char const* a, char const* b) { - for (;; a++, b++) { - int d = tolower((unsigned char)*a) - tolower((unsigned char)*b); - if (d != 0 || !*a) - return d; - } -} - /* look-up the calculated crc in the file n64.txt on sd card boolean searchCRC(char crcStr[9]) { boolean result = 0; @@ -2063,7 +2054,7 @@ int strcicmp(char const* a, char const* b) { } // Check if string is a match - if (strcicmp(tempStr1, crcStr) == 0) { + if (strcasecmp(tempStr1, crcStr) == 0) { // Skip the , in the file myFile.seekSet(myFile.curPosition() + 1);