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/plugins/rockpaint.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/plugins/rockpaint.c') diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index a4084a2ca7..219f013ed8 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c @@ -600,8 +600,8 @@ char bbuf[MAX_PATH+1]; /* used by file and font browsers */ char bbuf_s[MAX_PATH+1]; /* used by file and font browsers */ struct tree_context *tree = NULL; -static char * browse_get_name_cb( int selected_item, void *data, - char *buffer, size_t buffer_len ) +static const char* browse_get_name_cb(int selected_item, void *data, + char *buffer, size_t buffer_len) { int *indexes = (int *) data; struct entry* dc = tree->dircache; @@ -609,7 +609,7 @@ static char * browse_get_name_cb( int selected_item, void *data, (void) buffer; (void) buffer_len; - return (e->name); + return e->name; } static bool browse( char *dst, int dst_size, const char *start ) @@ -633,8 +633,8 @@ static bool browse( char *dst, int dst_size, const char *start ) } bbuf_s[0] = '\0'; - rb->gui_synclist_init( &browse_list, browse_get_name_cb, - (void*) indexes, false, 1, NULL ); + rb->gui_synclist_init(&browse_list, browse_get_name_cb, + (void*) indexes, false, 1, NULL); tree = rb->tree_get_context(); backup = *tree; -- cgit v1.2.3