Commit 4e0a25a4 authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

rtc_get_time_ms.c (grub_rtc_get_time_ms): Avoid division by zero.

parent b666e01b
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/generic/rtc_get_time_ms.c (grub_rtc_get_time_ms): Avoid
division by zero.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
 
* grub-core/loader/i386/xnu.c (guessfsb): Avoid division by 0.
......@@ -34,5 +34,5 @@ grub_rtc_get_time_ms (void)
1 s 1 T rtc ticks
*/
grub_uint64_t ticks_ms_per_sec = ((grub_uint64_t) 1000) * grub_get_rtc ();
return grub_divmod64 (ticks_ms_per_sec, GRUB_TICKS_PER_SECOND, 0);
return grub_divmod64 (ticks_ms_per_sec, GRUB_TICKS_PER_SECOND ? : 1000, 0);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment