From c48e4a31ab4a5976156a447b3c59776a8005d8cc Mon Sep 17 00:00:00 2001 From: finga Date: Sun, 19 Sep 2021 22:14:00 +0200 Subject: [PATCH] Use NULL instead of `strlen` for printing strings This makes more sense and also removes the dependency for `string.h`. --- firmware/src/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/firmware/src/main.c b/firmware/src/main.c index 311f91e..d76bf27 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -4,7 +4,6 @@ #include #include #include -#include #define SPI_PORT PORTB #define SPI_DDR DDRB @@ -255,7 +254,7 @@ static void lcd_write_character_page(const char character, static void lcd_write_string_page(const char* string, const uint8_t page, const bool invert) { - for (uint8_t i = 0; i < strlen(string); i++) { + for (uint8_t i = 0; string[i] != 0; i++) { lcd_write_kerning(2, invert); lcd_write_character_page(string[i], page, invert); }