8000 Move declaration to top level of block · magic-coder/sqlcipher@85a407e · GitHub
[go: up one dir, main page]

Skip to content

Commit 85a407e

Browse files
Move declaration to top level of block
1 parent 586515f commit 85a407e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ static int codec_set_pass_key(sqlite3* db, int nDb, const void *zKey, int nKey,
7979
}
8080

8181
int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLeft, const char *zRight) {
82+
char *pragma_cipher_deprecated_msg = "PRAGMA cipher command is deprecated, please remove from usage.";
8283
struct Db *pDb = &db->aDb[iDb];
8384
codec_ctx *ctx = NULL;
8485
int rc;
@@ -144,7 +145,6 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
144145
if(ctx) {
145146
if( zRight ) {
146147
sqlcipher_codec_ctx_set_cipher(ctx, zRight, 2); // change cipher for both
147-
char *pragma_cipher_deprecated_msg = "PRAGMA cipher command is deprecated, please remove from usage.";
148148
codec_vdbe_return_static_string(pParse, "cipher", pragma_cipher_deprecated_msg);
149149
sqlite3_log(SQLITE_WARNING, pragma_cipher_deprecated_msg);
150150
return SQLITE_ERROR;

src/crypto_cc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ static const char* sqlcipher_cc_get_provider_name(void *ctx) {
5252

5353
static const char* sqlcipher_cc_get_provider_version(void *ctx) {
5454
#if TARGET_OS_MAC
55+
CFTypeRef version;
5556
CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.security"));
5657
if(bundle == NULL) {
5758
return "unknown";
5859
}
59-
CFTypeRef version = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString"));
60+
version = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString"));
6061
return CFStringGetCStringPtr(version, kCFStringEncodingUTF8);
6162
#else
6263
return "unknown";

0 commit comments

Comments
 (0)
0