mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Fix a possible uninitialized variable.
Also, change the type to more accurately reflect its usage.
This commit is contained in:
parent
6224068586
commit
0a30eb6329
1 changed files with 5 additions and 5 deletions
|
@ -199,7 +199,7 @@ static bool volume_equal(struct volume *a, struct volume *b)
|
||||||
|
|
||||||
static int pipewire_update_volume(snd_ctl_pipewire_t * ctl)
|
static int pipewire_update_volume(snd_ctl_pipewire_t * ctl)
|
||||||
{
|
{
|
||||||
int changed;
|
bool changed = false;
|
||||||
struct global *g;
|
struct global *g;
|
||||||
|
|
||||||
if (ctl->sink == 0)
|
if (ctl->sink == 0)
|
||||||
|
@ -212,12 +212,12 @@ static int pipewire_update_volume(snd_ctl_pipewire_t * ctl)
|
||||||
if (!!ctl->sink_muted != !!g->node.mute) {
|
if (!!ctl->sink_muted != !!g->node.mute) {
|
||||||
ctl->sink_muted = g->node.mute;
|
ctl->sink_muted = g->node.mute;
|
||||||
ctl->updated |= UPDATE_SINK_MUTE;
|
ctl->updated |= UPDATE_SINK_MUTE;
|
||||||
changed = 1;
|
changed = true;
|
||||||
}
|
}
|
||||||
if (!volume_equal(&ctl->sink_volume, &g->node.channel_volume)) {
|
if (!volume_equal(&ctl->sink_volume, &g->node.channel_volume)) {
|
||||||
ctl->sink_volume = g->node.channel_volume;
|
ctl->sink_volume = g->node.channel_volume;
|
||||||
ctl->updated |= UPDATE_SINK_VOL;
|
ctl->updated |= UPDATE_SINK_VOL;
|
||||||
changed = 1;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,12 +231,12 @@ static int pipewire_update_volume(snd_ctl_pipewire_t * ctl)
|
||||||
if (!!ctl->source_muted != !!g->node.mute) {
|
if (!!ctl->source_muted != !!g->node.mute) {
|
||||||
ctl->source_muted = g->node.mute;
|
ctl->source_muted = g->node.mute;
|
||||||
ctl->updated |= UPDATE_SOURCE_MUTE;
|
ctl->updated |= UPDATE_SOURCE_MUTE;
|
||||||
changed = 1;
|
changed = true;
|
||||||
}
|
}
|
||||||
if (!volume_equal(&ctl->source_volume, &g->node.channel_volume)) {
|
if (!volume_equal(&ctl->source_volume, &g->node.channel_volume)) {
|
||||||
ctl->source_volume = g->node.channel_volume;
|
ctl->source_volume = g->node.channel_volume;
|
||||||
ctl->updated |= UPDATE_SOURCE_VOL;
|
ctl->updated |= UPDATE_SOURCE_VOL;
|
||||||
changed = 1;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue