aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 21:18:40 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 21:18:40 +0100
commit200ef56d4dfbcead7e20d036352f20cd67612772 (patch)
tree8c7ff1fdd3c5a6aff671d9752059be951107c8d5 /src/main.c
parent82166b715c2e8b39eb20d179c95aa982335ad07c (diff)
downloadmpd-200ef56d4dfbcead7e20d036352f20cd67612772.tar.gz
mpd-200ef56d4dfbcead7e20d036352f20cd67612772.tar.xz
mpd-200ef56d4dfbcead7e20d036352f20cd67612772.zip
database: use stdbool
Make db_load(), db_save() and db_check() return bool instead of int.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index bd00d4007..0efb512ea 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();