Module Name: src
Committed By: uwe
Date: Fri Jul 17 02:05:44 UTC 2020
Modified Files:
src/sys/dev: cninit.c
Log Message:
Do not recycle loop variable for unrealated purposes.
It just obfuscates the code. Same object code is generated.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/cninit.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/cninit.c
diff -u src/sys/dev/cninit.c:1.11 src/sys/dev/cninit.c:1.12
--- src/sys/dev/cninit.c:1.11 Tue Feb 8 20:20:26 2011
+++ src/sys/dev/cninit.c Fri Jul 17 02:05:44 2020
@@ -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