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:
+3
-5
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user