* grub-core/kern/mm.c (grub_real_malloc): Use AND rather than MOD
for alignment.
This commit is contained in:
parent
e2a6810069
commit
c6b755df45
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-11-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/mm.c (grub_real_malloc): Use AND rather than MOD
|
||||||
|
for alignment.
|
||||||
|
|
||||||
2013-11-08 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-11-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/lib/reed_solomon.c (grub_reed_solomon_recover): Add
|
* grub-core/lib/reed_solomon.c (grub_reed_solomon_recover): Add
|
||||||
|
|
|
@ -194,7 +194,7 @@ grub_real_malloc (grub_mm_header_t *first, grub_size_t n, grub_size_t align)
|
||||||
{
|
{
|
||||||
grub_off_t extra;
|
grub_off_t extra;
|
||||||
|
|
||||||
extra = ((grub_addr_t) (p + 1) >> GRUB_MM_ALIGN_LOG2) % align;
|
extra = ((grub_addr_t) (p + 1) >> GRUB_MM_ALIGN_LOG2) & (align - 1);
|
||||||
if (extra)
|
if (extra)
|
||||||
extra = align - extra;
|
extra = align - extra;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue