database: use stdbool
Make db_load(), db_save() and db_check() return bool instead of int.
This commit is contained in:
@@ -128,7 +128,7 @@ static void openDB(Options * options, char *argv0)
|
||||
{
|
||||
db_init();
|
||||
|
||||
if (options->createDB > 0 || db_load() < 0) {
|
||||
if (options->createDB > 0 || !db_load()) {
|
||||
unsigned job;
|
||||
|
||||
if (options->createDB < 0) {
|
||||
@@ -136,7 +136,8 @@ static void openDB(Options * options, char *argv0)
|
||||
"\"--no-create-db\" command line option; "
|
||||
"try running \"%s --create-db\"", argv0);
|
||||
}
|
||||
if (db_check() < 0)
|
||||
|
||||
if (!db_check())
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
db_clear();
|
||||
|
||||
Reference in New Issue
Block a user