make rounding happen up and down for e_backlight util when converting

to integer.



SVN revision: 60481
This commit is contained in:
Carsten Haitzler 2011-06-19 06:26:29 +00:00
parent 5f28496f92
commit e8dad4040c
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ main(int argc,
}
if (maxlevel > 0)
{
curlevel = (maxlevel * level) / 1000;
curlevel = ((maxlevel * level) + (500 / maxlevel)) / 1000;
return write_file(file, curlevel);
}
return -1;