File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1017,7 +1017,7 @@ int sqlcipher_codec_ctx_migrate(codec_ctx *ctx) {
10171017 commands [2 ] = attach_command ;
10181018 commands [3 ] = "SELECT sqlcipher_export('migrate');" ;
10191019
1020- for (command_idx = 0 ; command_idx < ( sizeof ( commands )/ sizeof ( commands [ 0 ]) ); command_idx ++ ){
1020+ for (command_idx = 0 ; command_idx < ArraySize ( commands ); command_idx ++ ){
10211021 const char * command = commands [command_idx ];
10221022 if (strcmp (command , "" ) == 0 ){
10231023 continue ;
@@ -1070,7 +1070,7 @@ int sqlcipher_codec_ctx_migrate(codec_ctx *ctx) {
10701070 sqlite3CodecGetKey (db , db -> nDb - 1 , (void * * )& key , & password_sz );
10711071 sqlite3CodecAttach (db , 0 , key , password_sz );
10721072
1073- for (i = 0 ; i < ( sizeof ( aCopy )/ sizeof ( aCopy [ 0 ]) ); i += 2 ){
1073+ for (i = 0 ; i < ArraySize ( aCopy ); i += 2 ){
10741074 sqlite3BtreeGetMeta (pSrc , aCopy [i ], & meta );
10751075 rc = sqlite3BtreeUpdateMeta (pDest , aCopy [i ], meta + aCopy [i + 1 ]);
10761076 if ( NEVER (rc != SQLITE_OK ) ) goto handle_error ;
You can’t perform that action at this time.
0 commit comments