c2d5d21
From 71f0db9ccb46be357c9b6505d35340150795996c Mon Sep 17 00:00:00 2001
c2d5d21
From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
c2d5d21
Date: Thu, 9 May 2013 13:57:49 +0530
c2d5d21
Subject: iscsiadm: Check for mode is not required when creating params list
c2d5d21
c2d5d21
There is no need to explicitly check for mode while creating the params
c2d5d21
list of name/value pairs.
c2d5d21
c2d5d21
Reported-by: Leeman Duncan <leeman.duncan@gmail.com>
c2d5d21
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
c2d5d21
---
c2d5d21
 usr/iscsiadm.c | 4 +---
c2d5d21
 1 file changed, 1 insertion(+), 3 deletions(-)
c2d5d21
c2d5d21
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
c2d5d21
index efe6383..84d5a27 100644
c2d5d21
--- a/usr/iscsiadm.c
c2d5d21
+++ b/usr/iscsiadm.c
c2d5d21
@@ -2962,9 +2962,7 @@ main(int argc, char **argv)
c2d5d21
 			usage(0);
c2d5d21
 		}
c2d5d21
 
c2d5d21
-		if ((mode == MODE_IFACE ||
c2d5d21
-		     (mode == MODE_HOST && sub_mode == MODE_FLASHNODE)) &&
c2d5d21
-		    name && value) {
c2d5d21
+		if (name && value) {
c2d5d21
 			param = idbm_alloc_user_param(name, value);
c2d5d21
 			if (!param) {
c2d5d21
 				log_error("Cannot allocate memory for params.");
c2d5d21
-- 
c2d5d21
1.8.1.4
c2d5d21