summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-24 21:31:38 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-24 21:32:19 -0500
commitfd7ae69962c40dd5c2928e61a07850c997355a6e (patch)
tree2476613a55f4d57d0363cb2d312ca6860c8a10d5 /src
parentfc7b9ff717b272295d097588db43b6df7116f2ac (diff)
exit without crashing when empdd is run manually with --option
fix T2591
Diffstat (limited to 'src')
-rw-r--r--src/bin/empdd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/empdd.c b/src/bin/empdd.c
index 63442a3..bdc3ada 100644
--- a/src/bin/empdd.c
+++ b/src/bin/empdd.c
@@ -1387,6 +1387,14 @@ main(int argc, char *argv[])
1387{ 1387{
1388 struct mpd_settings *settings = NULL; 1388 struct mpd_settings *settings = NULL;
1389 const char *h, *pass, *p = NULL; 1389 const char *h, *pass, *p = NULL;
1390 int i;
1391
1392 for (i = 0; i < argc; i++)
1393 if (argv[i][0] == '-')
1394 {
1395 fprintf(stderr, "USAGE: %s <HOST<:PORT>> <PORT>\n", argv[0]);
1396 return 1;
1397 }
1390 1398
1391 pass = getenv("MPD_PASSWORD"); 1399 pass = getenv("MPD_PASSWORD");
1392 p = getenv("MPD_PORT"); 1400 p = getenv("MPD_PORT");