summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authoruwe <uwe@NetBSD.org>2022-05-15 16:12:52 +0000
committeruwe <uwe@NetBSD.org>2022-05-15 16:12:52 +0000
commit9fa52accc0f467b114ccf20c5d83140d40b70b1c (patch)
tree519afa3744dea59a020509557ed17a92f41b15d6 /sys/dev
parenta48dbad8a6469e34459706fbdcd1adbe7028a202 (diff)
rasops_mapchar: cosmetics, same object code.
Don't hide the important function call inside an if condition. Don't reuse a variable, changing what it means in the middle of an expression.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/rasops/rasops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c
index 359a55df56a..84f3c7067e9 100644
--- a/sys/dev/rasops/rasops.c
+++ b/sys/dev/rasops/rasops.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.c,v 1.126 2022/05/15 10:29:20 uwe Exp $ */
+/* $NetBSD: rasops.c,v 1.127 2022/05/15 16:12:52 uwe Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.126 2022/05/15 10:29:20 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.127 2022/05/15 16:12:52 uwe Exp $");
#ifdef _KERNEL_OPT
#include "opt_rasops.h"
@@ -596,13 +596,13 @@ rasops_mapchar(void *cookie, int c, u_int *cp)
KASSERT(ri->ri_font != NULL);
- if ((c = wsfont_map_unichar(ri->ri_font, c)) < 0 ||
- !CHAR_IN_FONT(c, PICK_FONT(ri, c))) {
+ int glyph = wsfont_map_unichar(ri->ri_font, c);
+ if (glyph < 0 || !CHAR_IN_FONT(glyph, PICK_FONT(ri, glyph))) {
*cp = ' ';
return 0;
}
- *cp = c;
+ *cp = glyph;
return 5;
}