Project

General

Profile

Bug #1978 » lint-store.patch

suggested fix - Milan Jurik, 2012-01-16 04:50 PM

View differences:

new/usr/src/lib/libstmf/common/store.c Sun Jan 15 20:40:00 2012
20 20
 */
21 21
/*
22 22
 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
23
 * Copyright 2012 Milan Jurik. All rights reserved.
23 24
 */
24 25

  
25 26
#include <libscf.h>
......
2338 2339
			default :
2339 2340
				ret = STMF_PS_ERROR;
2340 2341
				goto out;
2341
				break;
2342 2342
		}
2343 2343
	}
2344 2344
	if (getSet == SET) {
2345 2345
		switch (propType) {
2346 2346
			case STMF_DEFAULT_LU_STATE :
2347 2347
				psStmfProp = DEFAULT_LU_STATE;
2348
				if (strcasecmp(propVal, "online") == 0)
2348
				if (strcasecmp(propVal, "online") == 0) {
2349 2349
					psStmfPropVal = STMF_PS_LU_ONLINE;
2350
				else if (strcasecmp(propVal, "offline") == 0)
2350
				} else if (strcasecmp(propVal,
2351
				    "offline") == 0) {
2351 2352
					psStmfPropVal = STMF_PS_LU_OFFLINE;
2352
				else
2353
				} else {
2353 2354
					ret = STMF_PS_ERROR;
2354 2355
					goto out;
2356
				}
2355 2357
				break;
2356 2358
			case STMF_DEFAULT_TARGET_PORT_STATE :
2357 2359
				psStmfProp = DEFAULT_TARGET_PORT_STATE;
2358
				if (strcasecmp(propVal, "online") == 0)
2360
				if (strcasecmp(propVal, "online") == 0) {
2359 2361
					psStmfPropVal =
2360 2362
					    STMF_PS_TARGET_PORT_ONLINE;
2361
				else if (strcasecmp(propVal, "offline") == 0)
2363
				} else if (strcasecmp(propVal,
2364
				    "offline") == 0) {
2362 2365
					psStmfPropVal =
2363 2366
					    STMF_PS_TARGET_PORT_OFFLINE;
2364
				else
2367
				} else {
2365 2368
					ret = STMF_PS_ERROR;
2366 2369
					goto out;
2370
				}
2367 2371
				break;
2368 2372
			default :
2369 2373
				ret = STMF_PS_ERROR;
2370 2374
				goto out;
2371
				break;
2372 2375
		}
2373 2376
	}
2374 2377

  
(2-2/2)