diff options
author | Zhang Yanfei <zhangyanfei@cn.fujitsu.com> | 2013-03-14 01:28:36 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-03-14 09:45:16 +0100 |
commit | 8388bdce82c79452b93b3a1fa5c77d15dcbd0a18 (patch) | |
tree | 6dc940c928f43086e8be965168eab2b149a73cfa /kexec/arch/i386/kexec-multiboot-x86.c | |
parent | 0c1b89d3ca04ef7211c11243df590dba83fc2dc8 (diff) |
kexec: i386: use _ALIGN* to make the logic clear
By replacing all the explicit align opertion with marco _ALIGN*,
the code logic could be more clear.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/i386/kexec-multiboot-x86.c')
-rw-r--r-- | kexec/arch/i386/kexec-multiboot-x86.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kexec/arch/i386/kexec-multiboot-x86.c b/kexec/arch/i386/kexec-multiboot-x86.c index de2a423..3f787e1 100644 --- a/kexec/arch/i386/kexec-multiboot-x86.c +++ b/kexec/arch/i386/kexec-multiboot-x86.c @@ -230,9 +230,8 @@ int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len, * module command lines * ============== */ - mbi_bytes = (sizeof(*mbi) + command_line_len - + strlen (BOOTLOADER " " BOOTLOADER_VERSION) + 1 - + 3) & ~3; + mbi_bytes = _ALIGN(sizeof(*mbi) + command_line_len + + strlen (BOOTLOADER " " BOOTLOADER_VERSION) + 1, 4); mbi_buf = xmalloc(mbi_bytes); mbi = mbi_buf; memset(mbi, 0, sizeof(*mbi)); |