Small size reduction and performance increase in the string duplicator.

FossilOrigin-Name: cda998f080cb00779d8c0d1c83d8fe2b74462cd4
This commit is contained in:
drh
2016-10-17 00:48:06 +00:00
parent f013e20c66
commit cee11adaaa
3 changed files with 9 additions and 10 deletions
+2 -3
View File
@@ -726,9 +726,8 @@ char *sqlite3DbStrDup(sqlite3 *db, const char *z){
if( z==0 ){
return 0;
}
n = sqlite3Strlen30(z) + 1;
assert( (n&0x7fffffff)==n );
zNew = sqlite3DbMallocRaw(db, (int)n);
n = strlen(z) + 1;
zNew = sqlite3DbMallocRaw(db, n);
if( zNew ){
memcpy(zNew, z, n);
}