Move declaration to top level of block

This commit is contained in:
Nick Parker 2016-03-07 14:35:07 -06:00
parent 586515f39e
commit 85a407e259
2 changed files with 3 additions and 2 deletions

View File

@ -79,6 +79,7 @@ static int codec_set_pass_key(sqlite3* db, int nDb, const void *zKey, int nKey,
}
int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLeft, const char *zRight) {
char *pragma_cipher_deprecated_msg = "PRAGMA cipher command is deprecated, please remove from usage.";
struct Db *pDb = &db->aDb[iDb];
codec_ctx *ctx = NULL;
int rc;
@ -144,7 +145,6 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
if(ctx) {
if( zRight ) {
sqlcipher_codec_ctx_set_cipher(ctx, zRight, 2); // change cipher for both
char *pragma_cipher_deprecated_msg = "PRAGMA cipher command is deprecated, please remove from usage.";
codec_vdbe_return_static_string(pParse, "cipher", pragma_cipher_deprecated_msg);
sqlite3_log(SQLITE_WARNING, pragma_cipher_deprecated_msg);
return SQLITE_ERROR;

View File

@ -52,11 +52,12 @@ static const char* sqlcipher_cc_get_provider_name(void *ctx) {
static const char* sqlcipher_cc_get_provider_version(void *ctx) {
#if TARGET_OS_MAC
CFTypeRef version;
CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.security"));
if(bundle == NULL) {
return "unknown";
}
CFTypeRef version = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString"));
version = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString"));
return CFStringGetCStringPtr(version, kCFStringEncodingUTF8);
#else
return "unknown";