From e3d59fb590713c390ca21d414eff0575877ef5e6 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Thu, 28 Jan 2016 11:07:10 -0500 Subject: WT-60: big endian support Review comment, initialize buf where it's allocated. --- src/log/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); -- cgit v1.2.1