diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-06-22 13:04:16 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-08-31 12:29:07 +0200 |
commit | d1a0945f8412ab52ad523397d82be61ba835ae27 (patch) | |
tree | 99bf464b1079a26254956fc005819b79913c089a /include/ui | |
parent | 69db8dfc19cd0aff951c63a4ec1f1ed26417a4fc (diff) |
console: use DIV_ROUND_UP
I used the clang-tidy qemu-round check to generate the fix:
https://github.com/elmarco/clang-tools-extra
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/console.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ui/console.h b/include/ui/console.h index 7262bef6d3..8024878bae 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -328,7 +328,7 @@ static inline int surface_bits_per_pixel(DisplaySurface *s) static inline int surface_bytes_per_pixel(DisplaySurface *s) { int bits = PIXMAN_FORMAT_BPP(s->format); - return (bits + 7) / 8; + return DIV_ROUND_UP(bits, 8); } static inline pixman_format_code_t surface_format(DisplaySurface *s) |