Print this page
10132 smatch fixes for MDB
Reviewed by: Andy Fiddaman <andy@omniosce.org>

*** 20,30 **** */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * ! * FCP mdb module */ #include <sys/mdb_modapi.h> #include <sys/mutex.h> --- 20,30 ---- */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * ! * Copyright (c) 2018, Joyent, Inc. */ #include <sys/mdb_modapi.h> #include <sys/mutex.h>
*** 326,337 **** return (WALK_ERR); } tgt_hash_index = 0; ! while ((port.port_tgt_hash_table[tgt_hash_index] == NULL) && ! (tgt_hash_index < FCP_NUM_HASH)) { tgt_hash_index++; } wsp->walk_addr = (uintptr_t)(port.port_tgt_hash_table[tgt_hash_index]); --- 326,337 ---- return (WALK_ERR); } tgt_hash_index = 0; ! while (tgt_hash_index < FCP_NUM_HASH && ! port.port_tgt_hash_table[tgt_hash_index] == NULL) { tgt_hash_index++; } wsp->walk_addr = (uintptr_t)(port.port_tgt_hash_table[tgt_hash_index]);
*** 367,380 **** * locate the next hash list */ tgt_hash_index++; ! while ((port.port_tgt_hash_table[tgt_hash_index] == NULL) && ! (tgt_hash_index < FCP_NUM_HASH)) { tgt_hash_index++; - } if (tgt_hash_index == FCP_NUM_HASH) { /* You're done */ return (status); } --- 367,379 ---- * locate the next hash list */ tgt_hash_index++; ! while (tgt_hash_index < FCP_NUM_HASH && ! port.port_tgt_hash_table[tgt_hash_index] == NULL) tgt_hash_index++; if (tgt_hash_index == FCP_NUM_HASH) { /* You're done */ return (status); }