diff options
author | Jens Arnold <amiconn@rockbox.org> | 2011-10-17 19:21:25 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2011-10-17 19:21:25 +0000 |
commit | 03a8325a2d907719c27011472b0a1ee73bec7c8e (patch) | |
tree | 94135e6389456d62576611dd1b140a6bbbab6c06 /apps/menus/main_menu.c | |
parent | a453bee2fa96ae9a618e3eec0bcd11fb5a79b952 (diff) |
Simplify seconds_to_min(), and don't safeguard used parameter.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30779 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/main_menu.c')
-rw-r--r-- | apps/menus/main_menu.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 602becd2b3..7f8a56e887 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -430,18 +430,13 @@ static int sleep_timer(void) static int seconds_to_min(int secs) { - int min = secs / 60; - if ((secs % 60) > 50) /* round up for 50+ seconds */ - min++; - - return min; + return (secs + 10) / 60; /* round up for 50+ seconds */ } static char* sleep_timer_getname(int selected_item, void * data, char *buffer) { (void)selected_item; (void)data; - (void)buffer; int sec = get_sleep_timer(); char timer_buf[10]; /* we have no sprintf, so MAX_PATH is a guess */ |