On Thu, Jun 03, 2010 at 02:07:16PM +0400, Sergei Shtylyov wrote: > Daniel Mack wrote: > > >Signed-off-by: Daniel Mack <daniel@xxxxxxxx> > [...] > >diff --git a/lsusb.c b/lsusb.c > >index 43ce219..b0b073d 100644 > >--- a/lsusb.c > >+++ b/lsusb.c > >@@ -939,12 +939,16 @@ static void dump_audio_bmcontrols(const char *prefix, int bmcontrols, const stru > > break; > >- case USB_AUDIO_CLASS_2: > >- if (bmcontrols & (1 << (list->bit * 2))) > >- printf("%s%s Control (%s)\n", prefix, list->name, > >- bmcontrols & (2 << (list->bit * 2)) ? "read/write" : "read-only"); > >+ case USB_AUDIO_CLASS_2: { > >+ const char *ctrl_type[] = { "read-only", "ILLEGAL (0b10)", "read/write" }; > >+ int ctrl = (bmcontrols >> (list->bit * 2)) & 0x3; > >+ > >+ if (ctrl) > >+ printf("%s%s Control (%s)\n", prefix, list->name, ctrl_type[ctrl-1]); > > break; > >+ } > >+ > > } /* switch */ > > Hm, why this { at the same indent level? because the 'case' block opens a '{'. I couldn't find a better solution for this, except for making the variables non-local. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html