Author: hselasky
Date: Wed Jan 30 15:49:37 2013
New Revision: 246124
URL: http://svnweb.freebsd.org/changeset/base/246124

Log:
  Use an anonymous struct for generated string descriptors.
  
  Submitted by: Christoph Mallon

Modified:
  head/sys/dev/usb/usb.h

Modified: head/sys/dev/usb/usb.h
==============================================================================
--- head/sys/dev/usb/usb.h      Wed Jan 30 15:46:26 2013        (r246123)
+++ head/sys/dev/usb/usb.h      Wed Jan 30 15:49:37 2013        (r246124)
@@ -566,13 +566,12 @@ struct usb_string_descriptor {
 typedef struct usb_string_descriptor usb_string_descriptor_t;
 
 #define        USB_MAKE_STRING_DESC(m,name)    \
-struct name {                          \
+static const struct {                  \
   uByte bLength;                       \
   uByte bDescriptorType;               \
   uByte bData[sizeof((uint8_t []){m})];        \
-} __packed;                            \
-static const struct name name = {      \
-  .bLength = sizeof(struct name),      \
+} __packed name = {                    \
+  .bLength = sizeof(name),             \
   .bDescriptorType = UDESC_STRING,     \
   .bData = { m },                      \
 }
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to