Skip to contentSkip to conversation

DPCM: suspicious code in dpcm_prune_paths()

alsa-devel Guennadi Liakhovetski 2 participants 2 messages Sep 18, 2019 – Sep 19, 2019

lore
Share & tools
lore
#0 lore raw

Hi,

This code in dpcm_prune_paths() seems to have no effect:

		/* is there a valid CODEC DAI widget for this BE */
		for_each_rtd_codec_dai(dpcm->be, i, dai) {
			widget = dai_get_widget(dai, stream);

			/* prune the BE if it's no longer in our active list */
			if (widget && widget_in_list(list, widget))
				continue;
		}

Neither of the variables, that are modified in this loop are used outside of it. Was the "continue" maybe meant to continue the encompassing loop?

Thanks
Guennadi
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw
Quoted 11 lines · Guennadi Liakhovetski

This code in dpcm_prune_paths() seems to have no effect:

		/* is there a valid CODEC DAI widget for this BE */
		for_each_rtd_codec_dai(dpcm->be, i, dai) {
			widget = dai_get_widget(dai, stream);

			/* prune the BE if it's no longer in our active list */
			if (widget && widget_in_list(list, widget))
				continue;
		}
Quoted 2 lines

Neither of the variables, that are modified in this loop are used outside of it. Was the "continue" maybe meant to continue the encompassing loop?

Liam?

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel