Skip to content

Commit 366946b

Browse files
authored
Fix omitted return statement
Fixed undefined behavior by adding a return statement at the end of the completion callback function.
1 parent 12fd56a commit 366946b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/UsbHostMsd/UsbHostMsd.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ bool USBHostMSD::connect() {
9696
static bool in_progress = false;
9797
bool complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_data) {
9898
in_progress = false;
99+
return true;
99100
}
100101

101102
/* -------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)