qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement
Date: Mon, 8 Mar 2010 13:31:26 +0000
User-agent: KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; )

> Signed-off-by: Paul Bolle <address@hidden>
> ---
>  usb-linux.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/usb-linux.c b/usb-linux.c
> index a9c15c6..23155dd 100644
> --- a/usb-linux.c
> +++ b/usb-linux.c
> @@ -846,9 +846,6 @@ static int usb_linux_update_endp_table(USBHostDevice
>  *s) case 0x03:
>                  type = USBDEVFS_URB_TYPE_INTERRUPT;
>                  break;
> -            default:
> -                DPRINTF("usb_host: malformed endpoint type\n");
> -                type = USBDEVFS_URB_TYPE_BULK;
>              }
>              s->endp_table[(devep & 0xf) - 1].type = type;
>              s->endp_table[(devep & 0xf) - 1].halted = 0;
> 

I'd be tempted to replace it by an abort(). If it's provable redundant then 
the compiler will remove it anyway. If not then we at least get a noisy 
failure when someone breaks it.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]