From 829fbf506552e5864368fde2d3f3b7d05fcb69f4 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 5 Mar 2021 21:11:41 +0100 Subject: [PATCH] mixer: simple - use for loop in base_len() ... reduce the code a bit Signed-off-by: Jaroslav Kysela --- src/mixer/simple_none.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c index 01e9eb2d..71d88486 100644 --- a/src/mixer/simple_none.c +++ b/src/mixer/simple_none.c @@ -913,8 +913,7 @@ static int base_len(const char *name, selem_ctl_type_t *type) const struct suf *p; size_t nlen = strlen(name); - p = suffixes; - while (p->suffix) { + for (p = suffixes; p->suffix; p++) { size_t slen = strlen(p->suffix); size_t l; if (nlen > slen) { @@ -925,7 +924,6 @@ static int base_len(const char *name, selem_ctl_type_t *type) return l; } } - p++; } /* exception: "Capture Volume" and "Capture Switch" */ -- 2.47.3