Remove unused function
This commit is contained in:
parent
566436201e
commit
174bf4220e
@ -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)
|
static void delete_file_list_entry(void *obj)
|
||||||
{
|
{
|
||||||
if (obj)
|
if (obj)
|
||||||
|
Loading…
Reference in New Issue
Block a user