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
This commit is contained in:
parent
a453bee2fa
commit
03a8325a2d
1 changed files with 1 additions and 6 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue