diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-09-10 15:02:33 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-09-10 15:02:33 +0000 |
commit | b4674b242a7e5bc0dab3c47d5a3c5e981d5c1826 (patch) | |
tree | 42d4b77bb2ac0e500287a12fa90a812f861ab51c /sys/arch/sparc/dev | |
parent | 3e3f6e20b0649d75708c79a95fe26c6dddca6f8e (diff) |
Fix a zx_putchar() stupid bug I introduced nine years ago by actually
initializing variables before they get used.
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r-- | sys/arch/sparc/dev/zx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/sparc/dev/zx.c b/sys/arch/sparc/dev/zx.c index c8e11c55dd5..2574d3ba6d9 100644 --- a/sys/arch/sparc/dev/zx.c +++ b/sys/arch/sparc/dev/zx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zx.c,v 1.27 2015/03/28 19:07:08 miod Exp $ */ +/* $OpenBSD: zx.c,v 1.28 2015/09/10 15:02:32 miod Exp $ */ /* $NetBSD: zx.c,v 1.5 2002/10/02 16:52:46 thorpej Exp $ */ /* @@ -724,6 +724,10 @@ zx_putchar(void *cookie, int row, int col, u_int uc, long attr) dp = (volatile u_int32_t *)ri->ri_bits + ZX_COORDS(col * font->fontwidth, row * font->fontheight); + sc = ri->ri_hw; + zc = sc->sc_zc; + zd = sc->sc_zd_ss0; + if (uc == ' ') { zx_fillrect(ri, col, row, 1, 1, attr, ZX_STD_ROP); if (ul == 0) @@ -739,10 +743,6 @@ zx_putchar(void *cookie, int row, int col, u_int uc, long attr) SETREG(zd->zd_bg, bg << 24); SETREG(zc->zc_fontmsk, 0xffffffff << (32 - font->fontwidth)); } else { - sc = ri->ri_hw; - zc = sc->sc_zc; - zd = sc->sc_zd_ss0; - fb = (u_int8_t *)font->data + (uc - font->firstchar) * ri->ri_fontscale; fs = font->stride; |