Skip to contentSkip to conversation

usbredir: reorder fields in USBRedirDevice to reduce padding

PATCH New zhenwei.pi 1 participant 1 message Mar 6, 2018

lore
Share & tools
lore

zhenwei.pi

author
#0 lore raw

PATCH 1/1 usbredir: reorder fields in USBRedirDevice to reduce padding

Changing the current ordering saves 8 bytes per entry in x86_64.

---
 hw/usb/redirect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/usb/redirect.c +2 -2
index ec17430..65a9196 100644
@@ -106,10 +106,10 @@ struct USBRedirDevice {
     USBDevice dev;
     /* Properties */
     CharBackend cs;
+    bool enable_streams;
     uint8_t debug;
-    char *filter_str;
     int32_t bootindex;
-    bool enable_streams;
+    char *filter_str;
     /* Data passed from chardev the fd_read cb to the usbredirparser read cb */
     const uint8_t *read_buf;
     int read_buf_size;
Signature · 1 line
2.7.4