summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-12-24 09:52:10 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-12-24 09:52:10 +1100
commit8e8f824170b227e0c8a0ca800356ad8ba910bf33 (patch)
tree89ac376944dc9956adf1d645d8141719048adfd4
parent88c48e54dcd5cc6a96a2aec5f1d6876274d4e4e4 (diff)
downloadmongo-8e8f824170b227e0c8a0ca800356ad8ba910bf33.tar.gz
Minor cleanup: unused variables, KNF.
refs #1514
-rw-r--r--src/cursor/cur_log.c6
-rw-r--r--src/txn/txn_log.c10
-rw-r--r--src/txn/txn_recover.c6
3 files changed, 10 insertions, 12 deletions
diff --git a/src/cursor/cur_log.c b/src/cursor/cur_log.c
index dedc0f08d37..86e12a989fc 100644
--- a/src/cursor/cur_log.c
+++ b/src/cursor/cur_log.c
@@ -12,13 +12,13 @@
* Callback function from log_scan to get a log record.
*/
static int
-__curlog_logrec(
- WT_SESSION_IMPL *session, WT_ITEM *logrec, WT_LSN *lsnp, void *cookie,
- int firstrecord)
+__curlog_logrec(WT_SESSION_IMPL *session,
+ WT_ITEM *logrec, WT_LSN *lsnp, void *cookie, int firstrecord)
{
WT_CURSOR_LOG *cl;
cl = cookie;
+ WT_UNUSED(firstrecord);
/* Set up the LSNs and take a copy of the log record for the cursor. */
*cl->cur_lsn = *lsnp;
diff --git a/src/txn/txn_log.c b/src/txn/txn_log.c
index be5c6dc8941..d436e03a26b 100644
--- a/src/txn/txn_log.c
+++ b/src/txn/txn_log.c
@@ -72,9 +72,8 @@ __txn_commit_printlog(
/* The logging subsystem zero-pads records. */
while (*pp < end && **pp) {
- if (firstrecord == 0) {
+ if (!firstrecord)
fprintf(out, ",\n");
- }
firstrecord = 0;
@@ -426,9 +425,8 @@ __wt_txn_truncate_end(WT_SESSION_IMPL *session)
* Print a log record in a human-readable format.
*/
static int
-__txn_printlog(
- WT_SESSION_IMPL *session, WT_ITEM *rawrec, WT_LSN *lsnp, void *cookie,
- int firstrecord)
+__txn_printlog(WT_SESSION_IMPL *session,
+ WT_ITEM *rawrec, WT_LSN *lsnp, void *cookie, int firstrecord)
{
FILE *out;
WT_LOG_RECORD *logrec;
@@ -450,7 +448,7 @@ __txn_printlog(
/* First, peek at the log record type. */
WT_RET(__wt_logrec_read(session, &p, end, &rectype));
- if (firstrecord == 0)
+ if (!firstrecord)
fprintf(out, ",\n");
if (fprintf(out, " { \"lsn\" : [%" PRIu32 ",%" PRId64 "],\n",
diff --git a/src/txn/txn_recover.c b/src/txn/txn_recover.c
index 3c9cf2e712c..a8151e539b3 100644
--- a/src/txn/txn_recover.c
+++ b/src/txn/txn_recover.c
@@ -265,9 +265,8 @@ __txn_commit_apply(
* Roll the log forward to recover committed changes.
*/
static int
-__txn_log_recover(
- WT_SESSION_IMPL *session, WT_ITEM *logrec, WT_LSN *lsnp, void *cookie,
- int firstrecord)
+__txn_log_recover(WT_SESSION_IMPL *session,
+ WT_ITEM *logrec, WT_LSN *lsnp, void *cookie, int firstrecord)
{
WT_RECOVERY *r;
const uint8_t *end, *p;
@@ -277,6 +276,7 @@ __txn_log_recover(
r = cookie;
p = LOG_SKIP_HEADER(logrec->data);
end = (const uint8_t *)logrec->data + logrec->size;
+ WT_UNUSED(firstrecord);
/* First, peek at the log record type. */
WT_RET(__wt_logrec_read(session, &p, end, &rectype));