diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-08-20 16:47:44 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-08-20 16:47:44 +0000 |
commit | 3200d04d75c5e7556ed8880b155533e881a4d1e1 (patch) | |
tree | 188e2c9525b25cb8922a14766e51ab02bad3f831 /apps/filetypes.c | |
parent | 0a1728444882cdbc6a0c815bd88464de25ad94e9 (diff) | |
download | rockbox-3200d04d75c5e7556ed8880b155533e881a4d1e1.tar.gz rockbox-3200d04d75c5e7556ed8880b155533e881a4d1e1.zip |
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
Diffstat (limited to 'apps/filetypes.c')
-rw-r--r-- | apps/filetypes.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index 210b949578..ffa7161693 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -435,13 +435,13 @@ static enum themable_icons openwith_get_icon(int selected_item, void * data) | |||
435 | return filetypes[items[selected_item]].icon; | 435 | return filetypes[items[selected_item]].icon; |
436 | } | 436 | } |
437 | 437 | ||
438 | static char * openwith_get_name(int selected_item, void * data, | 438 | static const char* openwith_get_name(int selected_item, void * data, |
439 | char * buffer, size_t buffer_len) | 439 | char * buffer, size_t buffer_len) |
440 | { | 440 | { |
441 | (void)buffer; (void)buffer_len; | 441 | (void)buffer; (void)buffer_len; |
442 | struct cb_data *info = (struct cb_data *)data; | 442 | struct cb_data *info = (struct cb_data *)data; |
443 | int *items = info->items; | 443 | int *items = info->items; |
444 | char *s = strrchr(filetypes[items[selected_item]].plugin, '/'); | 444 | const char *s = strrchr(filetypes[items[selected_item]].plugin, '/'); |
445 | if (s) | 445 | if (s) |
446 | return s+1; | 446 | return s+1; |
447 | else return filetypes[items[selected_item]].plugin; | 447 | else return filetypes[items[selected_item]].plugin; |