diff options
author | Nils Wallménius <nils@rockbox.org> | 2008-09-24 20:03:53 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2008-09-24 20:03:53 +0000 |
commit | 93a87685c3f39e731f4297b07bd139420b2e5554 (patch) | |
tree | 6ef4cd5f3b2b1a770ea1102cc6ce5d12f508e2e2 /apps/menus | |
parent | 7d4cebd7dad4d1e5e97084c28a0f71d4d7142295 (diff) |
Clean up use of snprintf where strncpy if suited, avoid useless copying of constant strings for wps token evaluator, minor const police too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18625 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus')
-rw-r--r-- | apps/menus/main_menu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index aa993ecdc0..3995eafd24 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -204,7 +204,7 @@ static char* info_getname(int selected_item, void *data, } else { - snprintf(buffer, buffer_len, "%s", "--:--:--"); + strncpy(buffer, "--:--:--", buffer_len); } break; case INFO_DATE: @@ -218,7 +218,7 @@ static char* info_getname(int selected_item, void *data, } else { - snprintf(buffer, buffer_len, "%s", str(LANG_UNKNOWN)); + strncpy(buffer, str(LANG_UNKNOWN), buffer_len); } break; #endif @@ -492,7 +492,7 @@ static void sleep_timer_formatter(char* buffer, size_t buffer_size, int value, minutes = value - (hours * 60); snprintf(buffer, buffer_size, "%d:%02d", hours, minutes); } else { - snprintf(buffer, buffer_size, "%s", str(LANG_OFF)); + strncpy(buffer, str(LANG_OFF), buffer_size); } } |