* grub-core/normal/datetime.c (grub_get_weekday): Use if rather than

division.
This commit is contained in:
Vladimir Serbinenko 2013-11-13 09:26:13 +01:00
parent 16a22c3851
commit b2e9294fb9
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-11-13 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/datetime.c (grub_get_weekday): Use if rather than
division.
2013-11-13 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/uboot/init.c: Move grub_uboot_machine_type and

View file

@ -36,7 +36,10 @@ grub_get_weekday (struct grub_datetime *datetime)
{
unsigned a, y, m;
a = (14 - datetime->month) / 12;
if (datetime->month <= 2)
a = 1;
else
a = 0;
y = datetime->year - a;
m = datetime->month + 12 * a - 2;