[pulseaudio-commits] 3 commits - src/modules src/utils
Peter Meerwald
pmeerw at kemper.freedesktop.org
Tue Jan 13 03:06:35 PST 2015
src/modules/alsa/alsa-util.c | 2 +-
src/modules/module-tunnel.c | 2 +-
src/utils/pacmd.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit f5c001af5ff4e1a7432f96674ed6ea7ff6b2be5a
Author: Boris Egorov <egorov at linux.com>
Date: Mon Jan 12 23:52:12 2015 +0600
pacmd: add missing 'else' keyword
See code above for proper behavior.
Issue detected by PVS Studio
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
index 61b87a0..7e49296 100644
--- a/src/utils/pacmd.c
+++ b/src/utils/pacmd.c
@@ -333,7 +333,7 @@ int main(int argc, char*argv[]) {
if (watch_socket->revents & POLLHUP) {
ibuf_eof = true;
ibuf_length = 0;
- } if (watch_socket->revents & POLLOUT) {
+ } else if (watch_socket->revents & POLLOUT) {
ssize_t r;
pa_assert(ibuf_length > 0);
commit 1931e40b1c5316d119dc2e5d93428a2d0231b15d
Author: Boris Egorov <egorov at linux.com>
Date: Mon Jan 12 23:52:11 2015 +0600
tunnel: use proper value for pa_source_state switch
pa_source_state_t can have value PA_SOURCE_INVALID_STATE, not
PA_SINK_INVALID_STATE. It happens to be the same here, but it can break
sometimes.
Issue detected by PVS Studio.
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index bef6ae8..6600219 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -691,7 +691,7 @@ static int source_set_state(pa_source *s, pa_source_state_t state) {
case PA_SOURCE_UNLINKED:
case PA_SOURCE_INIT:
- case PA_SINK_INVALID_STATE:
+ case PA_SOURCE_INVALID_STATE:
;
}
commit 3e6ce485f090780f623a879ad6a8dfd85edf53c1
Author: Boris Egorov <egorov at linux.com>
Date: Mon Jan 12 23:52:10 2015 +0600
alsa-util: fix parenthesis position in err assignment
Issue detected by CppCheck and PVS Studio
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 4131cff..a9469c0 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -443,7 +443,7 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min, bool peri
snd_pcm_sw_params_alloca(&swparams);
- if ((err = snd_pcm_sw_params_current(pcm, swparams) < 0)) {
+ if ((err = snd_pcm_sw_params_current(pcm, swparams)) < 0) {
pa_log_warn("Unable to determine current swparams: %s\n", pa_alsa_strerror(err));
return err;
}
More information about the pulseaudio-commits
mailing list