diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-30 14:41:18 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-30 14:41:18 +0000 |
commit | e72339bbf0cf32cc88d5e54df91debe618e92ada (patch) | |
tree | 06929dc26671f0710b964d5bb0a7634f12528a36 /sys/dev/vt | |
parent | 20431f1fdeea72f57a3a56126ba1e194a9b8d076 (diff) | |
download | FreeBSD-src-e72339bbf0cf32cc88d5e54df91debe618e92ada.zip FreeBSD-src-e72339bbf0cf32cc88d5e54df91debe618e92ada.tar.gz |
sys: Make use of our rounddown() macro when sys/param.h is available.
No functional change.
Diffstat (limited to 'sys/dev/vt')
-rw-r--r-- | sys/dev/vt/hw/vga/vt_vga.c | 2 | ||||
-rw-r--r-- | sys/dev/vt/vt_core.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c index e81dcba..9788b7e 100644 --- a/sys/dev/vt/hw/vga/vt_vga.c +++ b/sys/dev/vt/hw/vga/vt_vga.c @@ -912,7 +912,7 @@ vga_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, uint8_t pattern_2colors; /* Align coordinates with the 8-pxels grid. */ - x1 = x / VT_VGA_PIXELS_BLOCK * VT_VGA_PIXELS_BLOCK; + x1 = rounddown(x, VT_VGA_PIXELS_BLOCK); y1 = y; x2 = roundup(x + width, VT_VGA_PIXELS_BLOCK); diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 2884c57..a90ab9f 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -640,9 +640,9 @@ vt_compute_drawable_area(struct vt_window *vw) if (vt_draw_logo_cpus) vw->vw_draw_area.tr_begin.tp_row += vt_logo_sprite_height; vw->vw_draw_area.tr_end.tp_col = vw->vw_draw_area.tr_begin.tp_col + - vd->vd_width / vf->vf_width * vf->vf_width; + rounddown(vd->vd_width, vf->vf_width); vw->vw_draw_area.tr_end.tp_row = vw->vw_draw_area.tr_begin.tp_row + - height / vf->vf_height * vf->vf_height; + rounddown(height, vf->vf_height); } static void |