aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-18 11:20:20 +0100
committerMax Kellermann <max@duempel.org>2014-01-18 11:20:20 +0100
commit9909a80d6ad10e8e1c3036aa3d55f93c1b0da832 (patch)
tree3bfe43601c9947ef8e639bae2abbf8417776c4b9
parenta52cae1dba188db8bc7c72102cbb1ef57639b843 (diff)
downloadmpd-9909a80d6ad10e8e1c3036aa3d55f93c1b0da832.tar.gz
mpd-9909a80d6ad10e8e1c3036aa3d55f93c1b0da832.tar.xz
mpd-9909a80d6ad10e8e1c3036aa3d55f93c1b0da832.zip
Main: eliminate variable "success"
-rw-r--r--src/Main.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index d7ff12815..4fb73a162 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -354,7 +354,6 @@ int mpd_main(int argc, char *argv[])
clock_t start;
bool create_db;
Error error;
- bool success;
daemonize_close_stdin();
@@ -376,8 +375,7 @@ int mpd_main(int argc, char *argv[])
io_thread_init();
config_global_init();
- success = parse_cmdline(argc, argv, &options, error);
- if (!success) {
+ if (!parse_cmdline(argc, argv, &options, error)) {
LogError(error);
return EXIT_FAILURE;
}
@@ -403,8 +401,7 @@ int mpd_main(int argc, char *argv[])
const unsigned max_clients = config_get_positive(CONF_MAX_CONN, 10);
instance->client_list = new ClientList(max_clients);
- success = listen_global_init(error);
- if (!success) {
+ if (!listen_global_init(error)) {
LogError(error);
return EXIT_FAILURE;
}
@@ -485,16 +482,16 @@ int mpd_main(int argc, char *argv[])
audio_output_all_set_replay_gain_mode(replay_gain_get_real_mode(instance->partition->playlist.queue.random));
- success = config_get_bool(CONF_AUTO_UPDATE, false);
+ if (config_get_bool(CONF_AUTO_UPDATE, false)) {
#ifdef ENABLE_INOTIFY
- if (success && mapper_has_music_directory())
- mpd_inotify_init(config_get_unsigned(CONF_AUTO_UPDATE_DEPTH,
- G_MAXUINT));
+ if (mapper_has_music_directory())
+ mpd_inotify_init(config_get_unsigned(CONF_AUTO_UPDATE_DEPTH,
+ G_MAXUINT));
#else
- if (success)
FormatWarning(main_domain,
"inotify: auto_update was disabled. enable during compilation phase");
#endif
+ }
config_global_check();