Skip to content

Commit

Permalink
nimble/drivers: Fix loop condition in nrf51 driver
Browse files Browse the repository at this point in the history
This condition was suggesting that loop can break while om is NULL but
this loop breaks only when copied enough bytes and om is expected to
have enough space.
  • Loading branch information
sjanc committed Jan 8, 2020
1 parent 86561f7 commit e1642b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nimble/drivers/nrf51/src/ble_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ ble_phy_rxpdu_copy(uint8_t *dptr, struct os_mbuf *rxpdu)
om = rxpdu;
dst = om->om_data;

while (om) {
while (true) {
/*
* Always copy blocks of length aligned to word size, only last mbuf
* will have remaining non-word size bytes appended.
Expand Down

0 comments on commit e1642b0

Please sign in to comment.