Skip to content

Commit

Permalink
Move declaration to top level of block
Browse files Browse the repository at this point in the history
  • Loading branch information
developernotes committed Mar 7, 2016
1 parent 586515f commit 85a407e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/crypto_cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 85a407e

Please sign in to comment.