Message ID | 1413702686-8751-1-git-send-email-daniel@zonque.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 49fd46d2ffc92de3f4bd2e337f60b8b6052dc8b6 |
Delegated to: | Takashi Iwai |
Headers | show |
At Sun, 19 Oct 2014 09:11:25 +0200, Daniel Mack wrote: > > Don't assign 'len' in cases where we don't make use of the returned value. > > Signed-off-by: Daniel Mack <daniel@zonque.org> Thanks, applied. Takashi > --- > sound/usb/mixer.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c > index 2e4a9db..63a8adb 100644 > --- a/sound/usb/mixer.c > +++ b/sound/usb/mixer.c > @@ -1290,9 +1290,8 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc, > kctl->id.name, > sizeof(kctl->id.name), 1); > if (!len) > - len = snprintf(kctl->id.name, > - sizeof(kctl->id.name), > - "Feature %d", unitid); > + snprintf(kctl->id.name, sizeof(kctl->id.name), > + "Feature %d", unitid); > } > > if (!mapped_name) > @@ -1305,9 +1304,9 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc, > */ > if (!mapped_name && !(state->oterm.type >> 16)) { > if ((state->oterm.type & 0xff00) == 0x0100) > - len = append_ctl_name(kctl, " Capture"); > + append_ctl_name(kctl, " Capture"); > else > - len = append_ctl_name(kctl, " Playback"); > + append_ctl_name(kctl, " Playback"); > } > append_ctl_name(kctl, control == UAC_FU_MUTE ? > " Switch" : " Volume"); > -- > 2.1.0 >
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 2e4a9db..63a8adb 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -1290,9 +1290,8 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc, kctl->id.name, sizeof(kctl->id.name), 1); if (!len) - len = snprintf(kctl->id.name, - sizeof(kctl->id.name), - "Feature %d", unitid); + snprintf(kctl->id.name, sizeof(kctl->id.name), + "Feature %d", unitid); } if (!mapped_name) @@ -1305,9 +1304,9 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc, */ if (!mapped_name && !(state->oterm.type >> 16)) { if ((state->oterm.type & 0xff00) == 0x0100) - len = append_ctl_name(kctl, " Capture"); + append_ctl_name(kctl, " Capture"); else - len = append_ctl_name(kctl, " Playback"); + append_ctl_name(kctl, " Playback"); } append_ctl_name(kctl, control == UAC_FU_MUTE ? " Switch" : " Volume");
Don't assign 'len' in cases where we don't make use of the returned value. Signed-off-by: Daniel Mack <daniel@zonque.org> --- sound/usb/mixer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)