Skip to content
Snippets Groups Projects
Commit d1a0945f authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

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: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: default avatarRichard Henderson <rth@twiddle.net>
parent 69db8dfc
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment