commandError() cleanups, fixup gcc checks

stripped binary size reduced by 9k on my machine from making
commandError a function.  We'll print out error messages slightly
slower before, but the smaller binary is more than worth it.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4488 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong
2006-07-30 08:47:50 +00:00
parent a0c8e3656b
commit e86fd65c81
8 changed files with 58 additions and 57 deletions

View File

@@ -162,8 +162,7 @@ void readDirectoryDBIfUpdateIsFinished()
int updateInit(int fd, List * pathList)
{
if (directory_updatePid > 0) {
commandError(fd, ACK_ERROR_UPDATE_ALREADY, "already updating",
NULL);
commandError(fd, ACK_ERROR_UPDATE_ALREADY, "already updating");
return -1;
}
@@ -217,7 +216,7 @@ int updateInit(int fd, List * pathList)
unblockSignals();
ERROR("updateInit: Problems forking()'ing\n");
commandError(fd, ACK_ERROR_SYSTEM,
"problems trying to update", NULL);
"problems trying to update");
directory_updatePid = 0;
return -1;
}
@@ -891,8 +890,7 @@ int printDirectoryInfo(int fd, char *name)
Directory *directory;
if ((directory = getDirectory(name)) == NULL) {
commandError(fd, ACK_ERROR_NO_EXIST, "directory not found",
NULL);
commandError(fd, ACK_ERROR_NO_EXIST, "directory not found");
return -1;
}
@@ -1288,7 +1286,7 @@ int traverseAllIn(int fd, char *name,
return forEachSong(fd, song, data);
}
commandError(fd, ACK_ERROR_NO_EXIST,
"directory or file not found", NULL);
"directory or file not found");
return -1;
}