diff options
author | Simon Wilson <ksattic@gmail.com> | 2016-02-14 14:48:31 -0800 |
---|---|---|
committer | Simon Wilson <ksattic@gmail.com> | 2016-02-14 14:48:31 -0800 |
commit | 2474d888d77882a84e322867d8f14906bd74b5fe (patch) | |
tree | cccf281e1fe1b1bd8d5db8a16ad83927de6f7780 /mixer.c | |
parent | ad66b45add9677c4a732fc3a020f7b5d19c38def (diff) | |
parent | 9d3cdd0ebfcd827881e3e3f723c7405701679a21 (diff) |
Merge pull request #72 from frgm/cppcheck
fix some cppcheck warnings
Diffstat (limited to 'mixer.c')
-rw-r--r-- | mixer.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -188,11 +188,13 @@ struct mixer_ctl *mixer_get_ctl(struct mixer *mixer, unsigned int id) struct mixer_ctl *mixer_get_ctl_by_name(struct mixer *mixer, const char *name) { unsigned int n; - struct mixer_ctl *ctl = mixer->ctl; + struct mixer_ctl *ctl; if (!mixer) return NULL; + ctl = mixer->ctl; + for (n = 0; n < mixer->count; n++) if (!strcmp(name, (char*) ctl[n].info.id.name)) return &ctl[n]; |