aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-02 16:58:51 +0100
committerMax Kellermann <max@duempel.org>2009-02-02 16:58:51 +0100
commitfdb80e74b7473f7357fdcc54eedd9a4f40963138 (patch)
tree401d027f60f43db15d4e1ea2128c2aadc794c958
parent37bcd711b57c1d668a9400be1a94f5d52d54f5a4 (diff)
downloadmpd-fdb80e74b7473f7357fdcc54eedd9a4f40963138.tar.gz
mpd-fdb80e74b7473f7357fdcc54eedd9a4f40963138.tar.xz
mpd-fdb80e74b7473f7357fdcc54eedd9a4f40963138.zip
main: don't pass argv[0] to openDB()
Don't mention the program name in the error message.
Diffstat (limited to '')
-rw-r--r--src/main.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index fbc1da0f4..9675074f9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -89,7 +89,7 @@ struct notify main_notify;
* process has been daemonized.
*/
static bool
-openDB(Options * options, char *argv0)
+openDB(const Options *options)
{
const char *path = config_get_path(CONF_DB_FILE);
bool ret;
@@ -113,11 +113,9 @@ openDB(Options * options, char *argv0)
ret = db_load();
if (!ret) {
- if (options->createDB < 0) {
+ if (options->createDB < 0)
g_error("can't open db file and using "
- "\"--no-create-db\" command line option; "
- "try running \"%s --create-db\"", argv0);
- }
+ "\"--no-create-db\" command line option");
if (!db_check())
exit(EXIT_FAILURE);
@@ -250,7 +248,7 @@ int main(int argc, char *argv[])
decoder_plugin_init_all();
update_global_init();
- create_db = !openDB(&options, argv[0]);
+ create_db = !openDB(&options);
#ifdef ENABLE_SQLITE
sticker_global_init(config_get_path(CONF_STICKER_FILE));