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)