* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > 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.lur...@redhat.com>
Acked-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > --- > monitor.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/monitor.c b/monitor.c > index fa3e3ac251..bcbf307b45 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -1348,7 +1348,7 @@ static void memory_dump(Monitor *mon, int count, int > format, int wsize, > > switch(format) { > case 'o': > - max_digits = (wsize * 8 + 2) / 3; > + max_digits = DIV_ROUND_UP(wsize * 8, 3); > break; > default: > case 'x': > @@ -1356,7 +1356,7 @@ static void memory_dump(Monitor *mon, int count, int > format, int wsize, > break; > case 'u': > case 'd': > - max_digits = (wsize * 8 * 10 + 32) / 33; > + max_digits = DIV_ROUND_UP(wsize * 8 * 10, 33); > break; > case 'c': > wsize = 1; > -- > 2.13.1.395.gf7b71de06 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK