From 174bf4220eccdb18cc824bf4e60ff818715f28b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sat, 15 May 2021 21:57:23 +0200 Subject: [PATCH] Remove unused function --- stm-firmware/ui/gui.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/stm-firmware/ui/gui.c b/stm-firmware/ui/gui.c index d3482fb..293a2ed 100644 --- a/stm-firmware/ui/gui.c +++ b/stm-firmware/ui/gui.c @@ -376,36 +376,6 @@ static void gui_menu_constant_temperature_driver(struct lcd_menu *menu, enum men } -/** - * @brief A safe strncpy which ensures thtat the copied string ends in a null character - * @param dest Destiantion ptr - * @param src Source pointer - * @param max_size maximum size of the destination (including null terminator) - * @return 0 if successful, positive, if string was to short to hold all data, negative if parameter error - */ -static int safe_strncpy(char *dest, const char *src, size_t max_size) { - size_t idx; - bool terminated = false; - - if (!dest || !src || !max_size) - return -1000; - - for (idx = 0; idx < max_size; idx++) { - dest[idx] = src[idx]; - if (src[idx] == '\0') { - terminated = true; - break; - } - } - - if (!terminated) { - dest[max_size - 1] = 0; - return 1; - } - - return 0; -} - static void delete_file_list_entry(void *obj) { if (obj)