mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:14:03 +00:00
noattach: more explicit return values, avoid potential non-bool return values
This commit is contained in:
parent
2440e432b8
commit
381e71be92
1 changed files with 4 additions and 4 deletions
|
|
@ -13,10 +13,10 @@ __declspec(dllexport)
|
||||||
int sqlite3_noattach_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) {
|
int sqlite3_noattach_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) {
|
||||||
SQLITE_EXTENSION_INIT2(pApi);
|
SQLITE_EXTENSION_INIT2(pApi);
|
||||||
|
|
||||||
int rc = sqlite3_set_authorizer(db, deny_attach_authorizer, 0);
|
if (sqlite3_set_authorizer(db, deny_attach_authorizer, 0) != SQLITE_OK) {
|
||||||
if (rc != SQLITE_OK) {
|
|
||||||
*pzErrMsg = sqlite3_mprintf("Tenancy: Failed to set authorizer");
|
*pzErrMsg = sqlite3_mprintf("Tenancy: Failed to set authorizer");
|
||||||
|
return SQLITE_ERROR;
|
||||||
|
} else {
|
||||||
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue