From a7249dc6e42059fba76b03c915c9130452bf5f1b Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Fri, 15 Jul 2022 17:51:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D1=8B?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82=D1=81=D1=83=D1=82=D1=81?= =?UTF-8?q?=D1=82=D0=B2=D0=B8=D0=B8=20=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF?= =?UTF-8?q?=D0=B0=20=D0=BA=20=D0=91=D0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db.c b/db.c index 7e176f6..d9e429e 100644 --- a/db.c +++ b/db.c @@ -16,7 +16,7 @@ static sqlite3 *dbGetBase(char *path) { - sqlite3 *db; + sqlite3 *db = NULL; if (sqlite3_open(path, &db) != SQLITE_OK) { @@ -146,7 +146,7 @@ Hosts *dbGetHostsList() fprintf(stderr, "Ошибка выполнения запроса: %s\n", err_msg); sqlite3_free(err_msg); sqlite3_close(db); - return false; + exit(-1); } sqlite3_close(db);