mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
mixer: simple - use for loop in base_len()
... reduce the code a bit Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
86b9c67774
commit
829fbf5065
1 changed files with 1 additions and 3 deletions
|
|
@ -913,8 +913,7 @@ static int base_len(const char *name, selem_ctl_type_t *type)
|
||||||
const struct suf *p;
|
const struct suf *p;
|
||||||
size_t nlen = strlen(name);
|
size_t nlen = strlen(name);
|
||||||
|
|
||||||
p = suffixes;
|
for (p = suffixes; p->suffix; p++) {
|
||||||
while (p->suffix) {
|
|
||||||
size_t slen = strlen(p->suffix);
|
size_t slen = strlen(p->suffix);
|
||||||
size_t l;
|
size_t l;
|
||||||
if (nlen > slen) {
|
if (nlen > slen) {
|
||||||
|
|
@ -925,7 +924,6 @@ static int base_len(const char *name, selem_ctl_type_t *type)
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* exception: "Capture Volume" and "Capture Switch" */
|
/* exception: "Capture Volume" and "Capture Switch" */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue