From a84d0e0361a59a4730af3715440034f721631422 Mon Sep 17 00:00:00 2001
From: David Gwynne <dlg@cvs.openbsd.org>
Date: Tue, 26 Jul 2005 22:32:08 +0000
Subject: slight shrinking

ok marco@
---
 sys/scsi/scsi_safte.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

(limited to 'sys')

diff --git a/sys/scsi/scsi_safte.c b/sys/scsi/scsi_safte.c
index f3b79eb5859..b820c84c819 100644
--- a/sys/scsi/scsi_safte.c
+++ b/sys/scsi/scsi_safte.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: scsi_safte.c,v 1.2 2005/07/26 16:28:28 jolan Exp $ */
+/*	$OpenBSD: scsi_safte.c,v 1.3 2005/07/26 22:32:07 dlg Exp $ */
 
 /*
  * Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -52,7 +52,7 @@ struct safte_softc {
 	struct device	sc_dev;
 	struct scsi_link *sc_link;
 
-	enum safte_state {
+	enum {
 		SAFTE_ST_NONE,
 		SAFTE_ST_INIT,
 		SAFTE_ST_ERR
@@ -98,18 +98,14 @@ safte_match(struct device *parent, void *match, void *aux)
 	struct scsi_inquiry_data	*inq = sa->sa_inqbuf;
 	struct scsi_inquiry_data	inqbuf;
 	struct scsi_inquiry		cmd;
-	struct safte_inq		*si;
+	struct safte_inq		*si = (struct safte_inq *)&inqbuf.extra;
 
 	if (inq == NULL)
 		return (0);
 
-	if ((inq->device & SID_TYPE) != T_PROCESSOR)
-		return (0);
-
-	if ((inq->version & SID_ANSII) != SID_ANSII_SCSI2)
-		return (0);
-
-	if ((inq->response_format & SID_ANSII) != SID_ANSII_SCSI2)
+	if ((inq->device & SID_TYPE) != T_PROCESSOR ||
+	    (inq->version & SID_ANSII) != SID_ANSII_SCSI2 ||
+	    (inq->response_format & SID_ANSII) != SID_ANSII_SCSI2)
 		return (0);
 
 	memset(&cmd, 0, sizeof(cmd));
@@ -126,7 +122,6 @@ safte_match(struct device *parent, void *match, void *aux)
 	    SCSI_DATA_IN) != 0)
 		return (0);
 
-	si = (struct safte_inq *)&inqbuf.extra;
 	if (memcmp(si->ident, SAFTE_IDENT, sizeof(si->ident)) == 0)
 		return (24);
 
-- 
cgit v1.2.3