From 90f390f315ae6ed0159d1d9d52fd88d781e941e1 Mon Sep 17 00:00:00 2001 From: marius Date: Sun, 15 Aug 2004 02:17:20 +0000 Subject: Fix a style(9) bug (variable definitions inside a nested scope) a patch of mine introduced in revision 1.10. Approved by: marcel Prodded by: marcel --- sys/dev/uart/uart_cpu_sparc64.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/dev/uart') diff --git a/sys/dev/uart/uart_cpu_sparc64.c b/sys/dev/uart/uart_cpu_sparc64.c index a56b0ad..1496faa 100644 --- a/sys/dev/uart/uart_cpu_sparc64.c +++ b/sys/dev/uart/uart_cpu_sparc64.c @@ -94,7 +94,8 @@ static phandle_t uart_cpu_getdev_console(phandle_t options, char *dev, size_t devsz) { char buf[32]; - phandle_t input; + ihandle_t stdin, stdout; + phandle_t chosen, input; if (OF_getprop(options, "input-device", dev, devsz) == -1) return (-1); @@ -103,9 +104,6 @@ uart_cpu_getdev_console(phandle_t options, char *dev, size_t devsz) if (OF_getprop(options, "output-device", buf, sizeof(buf)) == -1) return (-1); if (!strcmp(dev, "keyboard") && !strcmp(buf, "screen")) { - phandle_t chosen; - ihandle_t stdin, stdout; - if ((chosen = OF_finddevice("/chosen")) == -1) return (-1); if (OF_getprop(chosen, "stdin", &stdin, sizeof(stdin)) == -1) -- cgit v1.1