SQLite

Check-in [c419955df0]
Login

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

Overview
Comment:Remove duplicated assignment in realloc.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c419955df0ad0507ecb3869786d48458366d4e8f
User & Date: shaneh 2010-02-16 22:06:31.000
Context
2010-02-17
03:57
More rounding tests. (check-in: 3863638b8c user: shaneh tags: trunk)
2010-02-16
22:06
Remove duplicated assignment in realloc. (check-in: c419955df0 user: shaneh tags: trunk)
22:00
Added additional rounding tests. (check-in: b8ee76bc1f user: shaneh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/mem1.c.
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
** cases where nByte<=0 will have been intercepted by higher-level
** routines and redirected to xFree.
*/
static void *sqlite3MemRealloc(void *pPrior, int nByte){
  sqlite3_int64 *p = (sqlite3_int64*)pPrior;
  assert( pPrior!=0 && nByte>0 );
  nByte = ROUND8(nByte);
  p = (sqlite3_int64*)pPrior;
  p--;
  p = realloc(p, nByte+8 );
  if( p ){
    p[0] = nByte;
    p++;
  }
  return (void*)p;







<







71
72
73
74
75
76
77

78
79
80
81
82
83
84
** cases where nByte<=0 will have been intercepted by higher-level
** routines and redirected to xFree.
*/
static void *sqlite3MemRealloc(void *pPrior, int nByte){
  sqlite3_int64 *p = (sqlite3_int64*)pPrior;
  assert( pPrior!=0 && nByte>0 );
  nByte = ROUND8(nByte);

  p--;
  p = realloc(p, nByte+8 );
  if( p ){
    p[0] = nByte;
    p++;
  }
  return (void*)p;