Module Name: src
Committed By: christos
Date: Thu Jun 27 21:22:16 UTC 2013
Modified Files:
src/sys/arch/ia64/stand/common: fileload.c
Log Message:
fix uninitialized variable
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/common/fileload.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/arch/ia64/stand/common/fileload.c
diff -u src/sys/arch/ia64/stand/common/fileload.c:1.3 src/sys/arch/ia64/stand/common/fileload.c:1.4
--- src/sys/arch/ia64/stand/common/fileload.c:1.3 Thu Dec 27 15:21:51 2012
+++ src/sys/arch/ia64/stand/common/fileload.c Thu Jun 27 17:22:16 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fileload.c,v 1.3 2012/12/27 20:21:51 martin Exp $ */
+/* $NetBSD: fileload.c,v 1.4 2013/06/27 21:22:16 christos Exp $ */
/*-
* Copyright (c) 1998 Michael Smith <[email protected]>
@@ -61,7 +61,7 @@ int
command_load(int argc, char *argv[])
{
char *typestr;
- int dofile, dokld, ch, error;
+ int dofile, dokld, ch;
dokld = dofile = 0;
optind = 1;
@@ -89,11 +89,12 @@ command_load(int argc, char *argv[])
* Do we have explicit KLD load ?
*/
if (dokld || file_havepath(argv[1])) {
- error = file_loadkernel(argv[1], argc - 2, argv + 2);
+ int error = file_loadkernel(argv[1], argc - 2, argv + 2);
if (error == EEXIST)
sprintf(command_errbuf, "warning: KLD '%s' already loaded", argv[1]);
+ return error == 0 ? CMD_OK : CMD_ERROR;
}
- return (error == 0 ? CMD_OK : CMD_ERROR);
+ return CMD_OK;
}