Module Name: src
Committed By: andvar
Date: Fri May 26 06:27:51 UTC 2023
Modified Files:
src/sys/arch/bebox/stand/boot: siop.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/bebox/stand/boot/siop.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/bebox/stand/boot/siop.c
diff -u src/sys/arch/bebox/stand/boot/siop.c:1.11 src/sys/arch/bebox/stand/boot/siop.c:1.12
--- src/sys/arch/bebox/stand/boot/siop.c:1.11 Fri Jun 3 12:10:50 2022
+++ src/sys/arch/bebox/stand/boot/siop.c Fri May 26 06:27:51 2023
@@ -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' */