Skip to content

Commit fc5d32e

Browse files
committed
squeeze the usb identification code
1 parent daf415d commit fc5d32e

File tree

1 file changed

+4
-3
lines changed
  • supervisor/shared/usb

1 file changed

+4
-3
lines changed

supervisor/shared/usb/usb.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,12 @@ void usb_get_boot_py_data(uint8_t *temp_storage, size_t temp_storage_size) {
143143
if (usb_identification_allocation) {
144144
memcpy(temp_storage, usb_identification_allocation->ptr, sizeof(usb_identification_t));
145145
free_memory(usb_identification_allocation);
146+
}
146147
#else
147148
if (false) {
148-
// Nothing
149-
#endif
150-
} else {
149+
}
150+
#endif
151+
else {
151152
usb_identification_t defaults;
152153
// This compiles to less code than using a struct initializer.
153154
defaults.vid = USB_VID;

0 commit comments

Comments
 (0)