/ Check-in [b48cfd2d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix harmless MSVC compiler warning with MEMDEBUG defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | cygwinTempPath
Files: files | file ages | folders
SHA1: b48cfd2dfca70091a52deeeee16619237e1c270b
User & Date: mistachkin 2013-08-31 05:13:22
Context
2013-08-31
05:46
Avoid commenting out #include statements when building the amalgamation source code file. check-in: 2fca6d78 user: mistachkin tags: cygwinTempPath
05:13
Fix harmless MSVC compiler warning with MEMDEBUG defined. check-in: b48cfd2d user: mistachkin tags: cygwinTempPath
02:48
Improve the consistency of the diagnostic messages on Windows. check-in: c6f174a0 user: mistachkin tags: cygwinTempPath
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/mem2.c.

344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
  struct MemBlockHdr *pOldHdr;
  void *pNew;
  assert( mem.disallow==0 );
  assert( (nByte & 7)==0 );     /* EV: R-46199-30249 */
  pOldHdr = sqlite3MemsysGetHeader(pPrior);
  pNew = sqlite3MemMalloc(nByte);
  if( pNew ){
    memcpy(pNew, pPrior, nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize);
    if( nByte>pOldHdr->iSize ){
      randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - (int)pOldHdr->iSize);
    }
    sqlite3MemFree(pPrior);
  }
  return pNew;
}







|







344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
  struct MemBlockHdr *pOldHdr;
  void *pNew;
  assert( mem.disallow==0 );
  assert( (nByte & 7)==0 );     /* EV: R-46199-30249 */
  pOldHdr = sqlite3MemsysGetHeader(pPrior);
  pNew = sqlite3MemMalloc(nByte);
  if( pNew ){
    memcpy(pNew, pPrior, (int)(nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize));
    if( nByte>pOldHdr->iSize ){
      randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - (int)pOldHdr->iSize);
    }
    sqlite3MemFree(pPrior);
  }
  return pNew;
}