Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/bebox/stand/boot initialize error on definition to ...
details: https://anonhg.NetBSD.org/src/rev/e645fa9b5b54
branches: trunk
changeset: 376010:e645fa9b5b54
user: andvar <andvar%NetBSD.org@localhost>
date: Fri May 26 06:27:51 2023 +0000
description:
initialize error on definition to fix 'error' may not be initialized issue.
the commit unifies code between bebox and prep machines.
reported by Mootja _08.
diffstat:
sys/arch/bebox/stand/boot/siop.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r aa68bca91445 -r e645fa9b5b54 sys/arch/bebox/stand/boot/siop.c
--- a/sys/arch/bebox/stand/boot/siop.c Fri May 26 03:30:57 2023 +0000
+++ b/sys/arch/bebox/stand/boot/siop.c Fri May 26 06:27:51 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siop.c,v 1.11 2022/06/03 12:10:50 andvar Exp $ */
+/* $NetBSD: siop.c,v 1.12 2023/05/26 06:27:51 andvar Exp $ */
/*
* Copyright (c) 2010 KIYOHARA Takashi
* All rights reserved.
@@ -885,7 +885,7 @@ scsi_interpret_sense(struct siop_adapter
{
struct scsi_sense_data *sense;
u_int8_t key;
- int error;
+ int error = 0;
uint32_t info;
static const char *error_mes[] = {
"soft error (corrected)",
@@ -961,7 +961,6 @@ scsi_interpret_sense(struct siop_adapter
xs->resid = 0; /* not short read */
}
case SKEY_EQUAL:
- error = 0;
break;
case SKEY_NOT_READY:
if (adp->sd->sc_flags & FLAGS_REMOVABLE)
@@ -990,7 +989,6 @@ scsi_interpret_sense(struct siop_adapter
error = EROFS;
break;
case SKEY_BLANK_CHECK:
- error = 0;
break;
case SKEY_ABORTED_COMMAND:
/* XXX XXX initialize 'error' */
Home |
Main Index |
Thread Index |
Old Index