From 381e71be921ba364ff5abf967797d98c643531d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Sat, 4 Jan 2025 14:10:56 +0100 Subject: [PATCH] noattach: more explicit return values, avoid potential non-bool return values --- extensions/noattach.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/noattach.c b/extensions/noattach.c index a66df12e..a8acf8b6 100644 --- a/extensions/noattach.c +++ b/extensions/noattach.c @@ -13,10 +13,10 @@ __declspec(dllexport) int sqlite3_noattach_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) { SQLITE_EXTENSION_INIT2(pApi); - int rc = sqlite3_set_authorizer(db, deny_attach_authorizer, 0); - if (rc != SQLITE_OK) { + if (sqlite3_set_authorizer(db, deny_attach_authorizer, 0) != SQLITE_OK) { *pzErrMsg = sqlite3_mprintf("Tenancy: Failed to set authorizer"); + return SQLITE_ERROR; + } else { + return SQLITE_OK; } - - return rc; }