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
+3 -5
View File
@@ -178,7 +178,7 @@ static int changeOssVolumeLevel(int fd, int change, int rel)
if (rel) {
if ((current = getOssVolumeLevel()) < 0) {
commandError(fd, ACK_ERROR_SYSTEM,
"problem getting current volume", NULL);
"problem getting current volume");
return -1;
}
@@ -198,8 +198,7 @@ static int changeOssVolumeLevel(int fd, int change, int rel)
if (ioctl(volume_ossFd, MIXER_WRITE(volume_ossControl), &level) < 0) {
closeOssMixer();
commandError(fd, ACK_ERROR_SYSTEM, "problems setting volume",
NULL);
commandError(fd, ACK_ERROR_SYSTEM, "problems setting volume");
return -1;
}
@@ -361,8 +360,7 @@ static int changeAlsaVolumeLevel(int fd, int change, int rel)
if ((err =
snd_mixer_selem_set_playback_volume_all(volume_alsaElem,
level)) < 0) {
commandError(fd, ACK_ERROR_SYSTEM, "problems setting volume",
NULL);
commandError(fd, ACK_ERROR_SYSTEM, "problems setting volume");
WARNING("problems setting alsa volume: %s\n",
snd_strerror(err));
closeAlsaMixer();