/ Check-in [689421a9]
Login

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

Overview
Comment:Remove an unnecessary memset().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 689421a9f73ceeab9786840a2d6ee008124d1f25
User & Date: drh 2016-01-15 21:55:46
Context
2016-01-16
03:16
Fix a potential use-after-free problem when compiling with SQLITE_HAS_CODEC. check-in: 653ea15a user: drh tags: trunk
2016-01-15
21:55
Remove an unnecessary memset(). check-in: 689421a9 user: drh tags: trunk
19:54
Rationalize some code in fts5_storage.c. Add tests to cover recently added branches in fts5. check-in: 3b72df40 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/build.c.

495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
      continue;
    }
    if( j<i ){
      db->aDb[j] = db->aDb[i];
    }
    j++;
  }
  memset(&db->aDb[j], 0, (db->nDb-j)*sizeof(db->aDb[j]));
  db->nDb = j;
  if( db->nDb<=2 && db->aDb!=db->aDbStatic ){
    memcpy(db->aDbStatic, db->aDb, 2*sizeof(db->aDb[0]));
    sqlite3DbFree(db, db->aDb);
    db->aDb = db->aDbStatic;
  }
}







<







495
496
497
498
499
500
501

502
503
504
505
506
507
508
      continue;
    }
    if( j<i ){
      db->aDb[j] = db->aDb[i];
    }
    j++;
  }

  db->nDb = j;
  if( db->nDb<=2 && db->aDb!=db->aDbStatic ){
    memcpy(db->aDbStatic, db->aDb, 2*sizeof(db->aDb[0]));
    sqlite3DbFree(db, db->aDb);
    db->aDb = db->aDbStatic;
  }
}