diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-06-15 18:06:21 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-06-15 18:06:21 +0000 |
commit | 80dd76db7f927be1b6a967f43f36d705b701f153 (patch) | |
tree | 8d95e5e8eaaa92c3e581b1c991c0f82cdb33d435 /src/volume.c | |
parent | 28d6bb796a0cf53c8d53e0de78e00e1fedcbf02d (diff) | |
download | mpd-80dd76db7f927be1b6a967f43f36d705b701f153.tar.gz mpd-80dd76db7f927be1b6a967f43f36d705b701f153.tar.xz mpd-80dd76db7f927be1b6a967f43f36d705b701f153.zip |
fix C99 stuff for commandError
also some slight optimizations to interfacePrintWithFD() and myfprintf()
git-svn-id: https://svn.musicpd.org/mpd/trunk@1503 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/volume.c')
-rw-r--r-- | src/volume.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/volume.c b/src/volume.c index 4a1370b2f..fa2f8aaa9 100644 --- a/src/volume.c +++ b/src/volume.c @@ -145,7 +145,7 @@ int changeOssVolumeLevel(FILE * fp, int change, int rel) { if (rel) { if((current = getOssVolumeLevel()) < 0) { commandError(fp, ACK_ERROR_SYSTEM, - "problem getting current volume"); + "problem getting current volume", NULL); return -1; } @@ -159,7 +159,8 @@ int changeOssVolumeLevel(FILE * fp, int change, int rel) { level = (new << 8) + new; if(ioctl(volume_ossFd,MIXER_WRITE(volume_ossControl),&level) < 0) { - commandError(fp, ACK_ERROR_SYSTEM, "problems setting volume"); + commandError(fp, ACK_ERROR_SYSTEM, "problems setting volume", + NULL); return -1; } @@ -271,7 +272,8 @@ int changeAlsaVolumeLevel(FILE * fp, int change, int rel) { if((err = snd_mixer_selem_get_playback_volume(volume_alsaElem, SND_MIXER_SCHN_FRONT_LEFT,&level))<0) { - commandError(fp, ACK_ERROR_SYSTEM, "problems getting volume"); + commandError(fp, ACK_ERROR_SYSTEM, "problems getting volume", + NULL); WARNING("problems getting alsa volume: %s\n",snd_strerror(err)); return -1; } @@ -297,7 +299,8 @@ int changeAlsaVolumeLevel(FILE * fp, int change, int rel) { if((err = snd_mixer_selem_set_playback_volume_all( volume_alsaElem,level))<0) { - commandError(fp, ACK_ERROR_SYSTEM, "problems setting volume"); + commandError(fp, ACK_ERROR_SYSTEM, "problems setting volume", + NULL); WARNING("problems setting alsa volume: %s\n",snd_strerror(err)); return -1; } |