mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 11:14:18 +01:00
sound: Remove ncards variable from sound_oss_card_info()
The loop counter is also the card's index, so ncards is redundant. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45144
This commit is contained in:
parent
278953360e
commit
305db91d4b
@ -792,9 +792,7 @@ int
|
||||
sound_oss_card_info(oss_card_info *si)
|
||||
{
|
||||
struct snddev_info *d;
|
||||
int i, ncards;
|
||||
|
||||
ncards = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; pcm_devclass != NULL &&
|
||||
i < devclass_get_maxunit(pcm_devclass); i++) {
|
||||
@ -802,7 +800,7 @@ sound_oss_card_info(oss_card_info *si)
|
||||
if (!PCM_REGISTERED(d))
|
||||
continue;
|
||||
|
||||
if (ncards++ != si->card)
|
||||
if (i != si->card)
|
||||
continue;
|
||||
|
||||
PCM_UNLOCKASSERT(d);
|
||||
|
Loading…
Reference in New Issue
Block a user