diff options
| author | uwe <uwe@NetBSD.org> | 2020-07-17 02:05:44 +0000 |
|---|---|---|
| committer | uwe <uwe@NetBSD.org> | 2020-07-17 02:05:44 +0000 |
| commit | 03cd17575e28ecb63e4894698f61c8f8b6f1b4b8 (patch) | |
| tree | 9d5b287e4954f87453bf0ce6f51ee8c04fbb3a53 /sys/dev/cninit.c | |
| parent | 7f9ca26f4d3cf328b9b0a16abf611e5b1869ce52 (diff) | |
Do not recycle loop variable for unrealated purposes.
It just obfuscates the code. Same object code is generated.
Diffstat (limited to 'sys/dev/cninit.c')
| -rw-r--r-- | sys/dev/cninit.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/cninit.c b/sys/dev/cninit.c index 15a7f7d60bc..c1d34602b55 100644 --- a/sys/dev/cninit.c +++ b/sys/dev/cninit.c @@ -1,4 +1,4 @@ -/* $NetBSD: cninit.c,v 1.11 2011/02/08 20:20:26 rmind Exp $ */ +/* $NetBSD: cninit.c,v 1.12 2020/07/17 02:05:44 uwe Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cninit.c,v 1.11 2011/02/08 20:20:26 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cninit.c,v 1.12 2020/07/17 02:05:44 uwe Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -71,18 +71,20 @@ cninit(void) bestMatch = cp; } } + /* * No console, we can handle it */ - if ((cp = bestMatch) == NULL) + if (bestMatch == NULL) return; + /* * Turn on console */ { struct consdev *old_cn_tab = cn_tab; - (*cp->cn_init)(cp); + (*bestMatch->cn_init)(bestMatch); /* * Now let everyone know we have an active console they can * use for diagnostics. If we use cn_tab in the search loop |
