database: use stdbool

Make db_load(), db_save() and db_check() return bool instead of int.
This commit is contained in:
Max Kellermann
2009-01-04 21:18:40 +01:00
parent 82166b715c
commit 200ef56d4d
3 changed files with 27 additions and 26 deletions

View File

@@ -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();