/ Check-in [c419955d]
Login

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

Overview
Comment:Remove duplicated assignment in realloc.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c419955df0ad0507ecb3869786d48458366d4e8f
User & Date: shaneh 2010-02-16 22:06:31
Context
2010-02-17
03:57
More rounding tests. check-in: 3863638b user: shaneh tags: trunk
2010-02-16
22:06
Remove duplicated assignment in realloc. check-in: c419955d user: shaneh tags: trunk
22:00
Added additional rounding tests. check-in: b8ee76bc user: shaneh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes 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;