From 3200d04d75c5e7556ed8880b155533e881a4d1e1 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Thu, 20 Aug 2009 16:47:44 +0000 Subject: Make the formatter functions used by the settings return a pointer to avoid usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'apps/debug_menu.c') diff --git a/apps/debug_menu.c b/apps/debug_menu.c index ea53d445fd..4ca8b3fa4f 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -141,8 +141,8 @@ static char thread_status_char(unsigned status) return thread_status_chars[status]; } -static char* threads_getname(int selected_item, void *data, - char *buffer, size_t buffer_len) +static const char* threads_getname(int selected_item, void *data, + char *buffer, size_t buffer_len) { (void)data; struct thread_entry *thread; @@ -183,6 +183,7 @@ static char* threads_getname(int selected_item, void *data, return buffer; } + static int dbg_threads_action_callback(int action, struct gui_synclist *lists) { (void)lists; @@ -783,8 +784,8 @@ static bool dbg_hw_info(void) #endif /* !SIMULATOR */ #ifndef SIMULATOR -static char* dbg_partitions_getname(int selected_item, void *data, - char *buffer, size_t buffer_len) +static const char* dbg_partitions_getname(int selected_item, void *data, + char *buffer, size_t buffer_len) { (void)data; int partition = selected_item/2; @@ -2796,12 +2797,14 @@ static int menu_action_callback(int btn, struct gui_synclist *lists) } return btn; } -static char* dbg_menu_getname(int item, void * data, - char *buffer, size_t buffer_len) + +static const char* dbg_menu_getname(int item, void * data, + char *buffer, size_t buffer_len) { (void)data; (void)buffer; (void)buffer_len; return menuitems[item].desc; } + bool debug_menu(void) { struct simplelist_info info; -- cgit v1.2.3