diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2020-03-30 11:56:22 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-24 10:10:00 -0400 |
commit | 02560b13689650cf0d2f5825eaf480629ce9238f (patch) | |
tree | b52072cf7e72c08a35f974df85ba42f4c7b8c958 /tools/socfpgaimage.c | |
parent | e5ad99cc9924e374d9cedbec38b6303cb80d693f (diff) |
tool: use ALIGN() to align the size
Use the ALIGN() for size align so that the code is more readable.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'tools/socfpgaimage.c')
-rw-r--r-- | tools/socfpgaimage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/socfpgaimage.c b/tools/socfpgaimage.c index 8fa098338b..6dfd64e31d 100644 --- a/tools/socfpgaimage.c +++ b/tools/socfpgaimage.c @@ -203,7 +203,7 @@ static int sfp_sign_buffer(uint8_t *buf, uint8_t ver, uint8_t flags, uint32_t calc_crc; /* Align the length up */ - len = (len + 3) & ~3; + len = ALIGN(len, 4); /* Build header, adding 4 bytes to length to hold the CRC32. */ sfp_build_header(buf + HEADER_OFFSET, ver, flags, len + 4); |