diff options
author | Christian Hesse <mail@eworm.de> | 2013-10-30 22:17:45 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-10-30 22:17:45 +0100 |
commit | ef60c2c8884b8432b176fe7b25a3ff0e4157498f (patch) | |
tree | 2e1d61b3152aaad9ab5e52d8d3bff0696e269e6e /mpd-notification.c | |
parent | 8a0a37b645d9118a60de3d53b51be5a91c42defe (diff) | |
download | mpd-notification-ef60c2c8884b8432b176fe7b25a3ff0e4157498f.tar.gz mpd-notification-ef60c2c8884b8432b176fe7b25a3ff0e4157498f.tar.zst |
complain if hostname is empty
Diffstat (limited to 'mpd-notification.c')
-rw-r--r-- | mpd-notification.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mpd-notification.c b/mpd-notification.c index d439157..7e5b582 100644 --- a/mpd-notification.c +++ b/mpd-notification.c @@ -74,6 +74,10 @@ int main(int argc, char ** argv) { return EXIT_SUCCESS; case 'H': mpd_host = argv[i] + 2; + if (strlen(mpd_host) == 0) { + fprintf(stderr, "No host given!\n"); + return EXIT_FAILURE; + } printf("%s: using host %s\n", program, mpd_host); break; default: |