summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard PALO <richard@NetBSD.org>2015-09-19 08:55:30 +0200
committerRichard Lowe <richlowe@richlowe.net>2015-09-20 18:09:48 -0400
commit24f5a37652e188ebdcdd6da454511686935025df (patch)
treec5ff0b364acc7b2b197d42ff5fb7da0adf61cac8
parent71d45228ba245d505c3beae1d756e775616f6d5a (diff)
downloadillumos-joyent-24f5a37652e188ebdcdd6da454511686935025df.tar.gz
6134 fix result check in smp.c
Reviewed by: Josef Sipek <jeffpc@josefsipek.net> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--usr/src/cmd/scsi/smp/common/smp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/cmd/scsi/smp/common/smp.c b/usr/src/cmd/scsi/smp/common/smp.c
index 67155a5a5e..374049b845 100644
--- a/usr/src/cmd/scsi/smp/common/smp.c
+++ b/usr/src/cmd/scsi/smp/common/smp.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2015 PALO, Richard
*/
#include <sys/types.h>
#include <sys/scsi/generic/smp_frames.h>
@@ -180,7 +181,7 @@ smp_cmd_failed(smp_result_t result)
{
char *smp_result_str = smp_get_result(result);
- if (result == NULL) {
+ if (smp_result_str == NULL) {
fatal(-5, "Command failed: Unknown result (0x%x)",
result);
} else {
@@ -212,6 +213,7 @@ smp_cleanup()
smp_fini();
}
+/* ARGSUSED */
static void
smp_handle_report_route_info(int argc, char *argv[])
{
@@ -751,7 +753,6 @@ main(int argc, char *argv[])
(smp_report_broadcast_resp_t *)smp_resp;
smp_broadcast_descr_t *bdp = &brp->srbr_descrs[0];
uint16_t bcount, idx;
- uint8_t bctype;
bcount = brp->srbr_number_broadcast_descrs;