mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Do not use memcpy() of zero bytes when initializing a pager. This avoids
a warning. FossilOrigin-Name: cca437788e092b21ed1784dd94d4b1c7204ff1717538d276a10880d1345904bd
This commit is contained in:
10
src/pager.c
10
src/pager.c
@@ -4911,11 +4911,13 @@ int sqlite3PagerOpen(
|
||||
/* Fill in the Pager.zFilename and pPager.zQueryParam fields */
|
||||
pPtr[0] = '\003'; pPtr[1] = 0; pPtr += 2;
|
||||
pPager->zFilename = (char*)pPtr;
|
||||
memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1;
|
||||
if( zUri ){
|
||||
memcpy(pPtr, zUri, nUriByte); /* pPtr += nUriByte; // not needed */
|
||||
if( nPathname>0 ){
|
||||
memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1;
|
||||
if( zUri ){
|
||||
memcpy(pPtr, zUri, nUriByte); /* pPtr += nUriByte; // not needed */
|
||||
}
|
||||
/* Double-zero terminator implied by the sqlite3MallocZero */
|
||||
}
|
||||
/* Double-zero terminator implied by the sqlite3MallocZero */
|
||||
|
||||
if( nPathname ) sqlite3DbFree(0, zPathname);
|
||||
pPager->pVfs = pVfs;
|
||||
|
Reference in New Issue
Block a user