* grub-core/normal/datetime.c (grub_get_weekday): Use if rather than
division.
This commit is contained in:
parent
16a22c3851
commit
b2e9294fb9
2 changed files with 9 additions and 1 deletions
|
@ -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>
|
2013-11-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/kern/uboot/init.c: Move grub_uboot_machine_type and
|
* grub-core/kern/uboot/init.c: Move grub_uboot_machine_type and
|
||||||
|
|
|
@ -36,7 +36,10 @@ grub_get_weekday (struct grub_datetime *datetime)
|
||||||
{
|
{
|
||||||
unsigned a, y, m;
|
unsigned a, y, m;
|
||||||
|
|
||||||
a = (14 - datetime->month) / 12;
|
if (datetime->month <= 2)
|
||||||
|
a = 1;
|
||||||
|
else
|
||||||
|
a = 0;
|
||||||
y = datetime->year - a;
|
y = datetime->year - a;
|
||||||
m = datetime->month + 12 * a - 2;
|
m = datetime->month + 12 * a - 2;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue