summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSusan LoVerso <sue@wiredtiger.com>2016-01-19 18:48:56 -0500
committerSusan LoVerso <sue@wiredtiger.com>2016-01-19 18:48:56 -0500
commit87c3b645bab28e015cf7fbc7e2ba31f3e050c457 (patch)
tree24601aa7796994e7260f90c8407d99760dd7d2b5
parent6ba817a87a6853c885c7fd0ddc943e9f002c465f (diff)
downloadmongo-87c3b645bab28e015cf7fbc7e2ba31f3e050c457.tar.gz
WT-2332 Remove if statement and merge it into the assert.
-rw-r--r--src/log/log.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/log/log.c b/src/log/log.c
index 1ef8b82493c..afae054ec92 100644
--- a/src/log/log.c
+++ b/src/log/log.c
@@ -1970,10 +1970,13 @@ err:
myslot.slot != NULL)
ret = myslot.slot->slot_error;
- if (LF_ISSET(WT_LOG_FLUSH))
- WT_ASSERT(session, __wt_log_cmp(&log->write_lsn, &lsn) >= 0);
- if (LF_ISSET(WT_LOG_FSYNC))
- WT_ASSERT(session, __wt_log_cmp(&log->sync_lsn, &lsn) >= 0);
+ /*
+ * If one of the sync flags is set, assert the proper LSN has moved to match.
+ */
+ WT_ASSERT(session, !LF_ISSET(WT_LOG_FLUSH) ||
+ __wt_log_cmp(&log->write_lsn, &lsn) >= 0);
+ WT_ASSERT(session,
+ !LF_ISSET(WT_LOG_FSYNC) || __wt_log_cmp(&log->sync_lsn, &lsn) >= 0);
return (ret);
}