Add parenthesis to the ternary operator

Without the parenthesis, this particular ASSERT will evaluate to
"(RW_READER == (!zap->zap_ismicro && fatreader)) ? RW_READER : lti"

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3685
This commit is contained in:
tuxoko 2015-08-17 14:55:52 +08:00 committed by Brian Behlendorf
parent 9d4f86e825
commit 6d79eabf9f
1 changed files with 1 additions and 1 deletions

View File

@ -484,7 +484,7 @@ zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx,
/* it was upgraded, now we only need reader */ /* it was upgraded, now we only need reader */
ASSERT(lt == RW_WRITER); ASSERT(lt == RW_WRITER);
ASSERT(RW_READER == ASSERT(RW_READER ==
(!zap->zap_ismicro && fatreader) ? RW_READER : lti); ((!zap->zap_ismicro && fatreader) ? RW_READER : lti));
rw_downgrade(&zap->zap_rwlock); rw_downgrade(&zap->zap_rwlock);
lt = RW_READER; lt = RW_READER;
} }