On Sun, May 03, 2020 at 10:39:34PM +0100, Stuart Henderson wrote:
> On 2020/04/30 06:45, Alexandre Ratchov wrote:
> > CVSROOT:    /cvs
> > Module name:        src
> > Changes by: ratc...@cvs.openbsd.org 2020/04/30 06:45:52
> > 
> > Modified files:
> >     sys/dev/usb    : uaudio.c 
> > 
> > Log message:
> > If there's only one input (output) name it simply "input" ("output")
> > 
> > Besides making things simpler, this allows libsndio to figure out that
> > this is a control affecting all inputs (outputs) that needs to be
> > exposed.
> > 
> 
> as spotted by coverity, case 1 in switch (hi) around line 640 is redundant
> with this commit which added "if (hi == 1) return" above.
> 

Thanks. As this is unreachable code, I see no urgency and will fix it
after 6.7 is out.

Index: uaudio.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uaudio.c,v
retrieving revision 1.158
diff -u -p -r1.158 uaudio.c
--- uaudio.c    30 Apr 2020 12:45:52 -0000      1.158
+++ uaudio.c    4 May 2020 12:05:38 -0000
@@ -638,10 +638,6 @@ uaudio_tname(struct uaudio_softc *sc, un
 
        /* determine name from USB terminal type */
        switch (hi) {
-       case 1:
-               /* usb data stream */
-               name = isout ? UAUDIO_NAME_REC : UAUDIO_NAME_PLAY;
-               break;
        case 2:
                /* embedded inputs */
                name = isout ? "mic-out" : "mic";

Reply via email to