changeset 13565:fed8865d992e

1978 iPsGetSetStmfProp is missing some brackets Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Reviewed by: Jason King <jason.brian.king@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Milan Jurik <milan.jurik@xylab.cz>
date Mon, 16 Jan 2012 17:58:43 +0100
parents cf89c0c60496
children b2b4f797c428
files usr/src/lib/libstmf/common/store.c
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/libstmf/common/store.c	Tue Jan 17 02:59:29 2012 +0000
+++ b/usr/src/lib/libstmf/common/store.c	Mon Jan 16 17:58:43 2012 +0100
@@ -20,6 +20,7 @@
  */
 /*
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2012 Milan Jurik. All rights reserved.
  */
 
 #include <libscf.h>
@@ -2338,37 +2339,39 @@
 			default :
 				ret = STMF_PS_ERROR;
 				goto out;
-				break;
 		}
 	}
 	if (getSet == SET) {
 		switch (propType) {
 			case STMF_DEFAULT_LU_STATE :
 				psStmfProp = DEFAULT_LU_STATE;
-				if (strcasecmp(propVal, "online") == 0)
+				if (strcasecmp(propVal, "online") == 0) {
 					psStmfPropVal = STMF_PS_LU_ONLINE;
-				else if (strcasecmp(propVal, "offline") == 0)
+				} else if (strcasecmp(propVal,
+				    "offline") == 0) {
 					psStmfPropVal = STMF_PS_LU_OFFLINE;
-				else
+				} else {
 					ret = STMF_PS_ERROR;
 					goto out;
+				}
 				break;
 			case STMF_DEFAULT_TARGET_PORT_STATE :
 				psStmfProp = DEFAULT_TARGET_PORT_STATE;
-				if (strcasecmp(propVal, "online") == 0)
+				if (strcasecmp(propVal, "online") == 0) {
 					psStmfPropVal =
 					    STMF_PS_TARGET_PORT_ONLINE;
-				else if (strcasecmp(propVal, "offline") == 0)
+				} else if (strcasecmp(propVal,
+				    "offline") == 0) {
 					psStmfPropVal =
 					    STMF_PS_TARGET_PORT_OFFLINE;
-				else
+				} else {
 					ret = STMF_PS_ERROR;
 					goto out;
+				}
 				break;
 			default :
 				ret = STMF_PS_ERROR;
 				goto out;
-				break;
 		}
 	}