diff options
author | Keith Bostic <keith@wiredtiger.com> | 2016-01-28 11:07:10 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2016-01-28 11:07:35 -0500 |
commit | e3d59fb590713c390ca21d414eff0575877ef5e6 (patch) | |
tree | 2af0137ed44389ba0da40b5460fcfd89222e65d8 | |
parent | 8a6889cdf156f489ae4b77d0a3678fe1aae2d9cb (diff) | |
download | mongo-e3d59fb590713c390ca21d414eff0575877ef5e6.tar.gz |
WT-60: big endian support
Review comment, initialize buf where it's allocated.
-rw-r--r-- | src/log/log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/log/log.c b/src/log/log.c index 8cdb4b25027..6a740363bdb 100644 --- a/src/log/log.c +++ b/src/log/log.c @@ -594,6 +594,8 @@ __log_file_header( WT_ASSERT(session, sizeof(WT_LOG_DESC) < log->allocsize); WT_RET(__wt_scr_alloc(session, log->allocsize, &buf)); memset(buf->mem, 0, log->allocsize); + buf->size = log->allocsize; + logrec = (WT_LOG_RECORD *)buf->mem; desc = (WT_LOG_DESC *)logrec->record; desc->log_magic = WT_LOG_MAGIC; @@ -616,7 +618,6 @@ __log_file_header( #ifdef WORDS_BIGENDIAN logrec->checksum = __wt_bswap32(logrec->checksum); #endif - buf->size = log->allocsize; WT_CLEAR(tmp); memset(&myslot, 0, sizeof(myslot)); |