mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-07-22 18:54:36 +00: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
|
@ -199,7 +199,7 @@ static bool volume_equal(struct volume *a, struct volume *b)
|
|||
|
||||
static int pipewire_update_volume(snd_ctl_pipewire_t * ctl)
|
||||
{
|
||||
int changed;
|
||||
bool changed = false;
|
||||
struct global *g;
|
||||
|
||||
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) {
|
||||
ctl->sink_muted = g->node.mute;
|
||||
ctl->updated |= UPDATE_SINK_MUTE;
|
||||
changed = 1;
|
||||
changed = true;
|
||||
}
|
||||
if (!volume_equal(&ctl->sink_volume, &g->node.channel_volume)) {
|
||||
ctl->sink_volume = g->node.channel_volume;
|
||||
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) {
|
||||
ctl->source_muted = g->node.mute;
|
||||
ctl->updated |= UPDATE_SOURCE_MUTE;
|
||||
changed = 1;
|
||||
changed = true;
|
||||
}
|
||||
if (!volume_equal(&ctl->source_volume, &g->node.channel_volume)) {
|
||||
ctl->source_volume = g->node.channel_volume;
|
||||
ctl->updated |= UPDATE_SOURCE_VOL;
|
||||
changed = 1;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue