several code clean-ups and corrections

This commit is contained in:
unK
2008-10-07 10:14:21 +02:00
parent 5b724f2a83
commit a85cfcd8eb
4 changed files with 44 additions and 48 deletions

View File

@@ -136,8 +136,8 @@ bool ParseArgv(vector<string> &v)
else if (*it == "volume")
{
it++;
Mpd->GetStatus();
if (Mpd->CheckForErrors())
Mpd->UpdateStatus();
if (!Mpd->GetErrorMessage().empty())
{
cout << "Error: " << Mpd->GetErrorMessage() << endl;
return 1;
@@ -151,7 +151,7 @@ bool ParseArgv(vector<string> &v)
cout << "ncmpcpp: invalid option " << *it << endl;
return 1;
}
if (Mpd->CheckForErrors())
if (!Mpd->GetErrorMessage().empty())
{
cout << "Error: " << Mpd->GetErrorMessage() << endl;
return 1;