Skip to content

Commit

Permalink
ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
Browse files Browse the repository at this point in the history
Patch created mechanically by rerunning:

  $  spatch --sp-file scripts/coccinelle/round.cocci \
            --macro-file scripts/cocci-macro-file.h \
            --dir . --in-place

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180704153919.12432-7-f4bug@amsat.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
philmd authored and kraxel committed Aug 24, 2018
1 parent 6fb34ff commit 949ed4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/vnc-enc-tight.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ static int send_mono_rect(VncState *vs, int x, int y,
}
#endif

bytes = (DIV_ROUND_UP(w, 8)) * h;
bytes = DIV_ROUND_UP(w, 8) * h;

vnc_write_u8(vs, (stream | VNC_TIGHT_EXPLICIT_FILTER) << 4);
vnc_write_u8(vs, VNC_TIGHT_FILTER_PALETTE);
Expand Down
3 changes: 2 additions & 1 deletion ui/vnc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,8 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
PIXMAN_FORMAT_BPP(pixman_image_get_format(vd->guest.fb));
guest_row0 = (uint8_t *)pixman_image_get_data(vd->guest.fb);
guest_stride = pixman_image_get_stride(vd->guest.fb);
guest_ll = pixman_image_get_width(vd->guest.fb) * (DIV_ROUND_UP(guest_bpp, 8));
guest_ll = pixman_image_get_width(vd->guest.fb)
* DIV_ROUND_UP(guest_bpp, 8);
}
line_bytes = MIN(server_stride, guest_ll);

Expand Down

0 comments on commit 949ed4c

Please sign in to comment.