MYNEWT-342: Fix invalid access address generation
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/37f8bb58 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/37f8bb58 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/37f8bb58 Branch: refs/heads/sterly_refactor Commit: 37f8bb58ddf0b9aef5c180543b5f1e1b1f3ad127 Parents: cf6c3da Author: William San Filippo <[email protected]> Authored: Tue Jul 26 10:44:32 2016 -0700 Committer: Sterling Hughes <[email protected]> Committed: Sun Jul 31 21:58:57 2016 -0700 ---------------------------------------------------------------------- net/nimble/controller/src/ble_ll_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/37f8bb58/net/nimble/controller/src/ble_ll_conn.c ---------------------------------------------------------------------- diff --git a/net/nimble/controller/src/ble_ll_conn.c b/net/nimble/controller/src/ble_ll_conn.c index ca94310..f711dfb 100644 --- a/net/nimble/controller/src/ble_ll_conn.c +++ b/net/nimble/controller/src/ble_ll_conn.c @@ -462,8 +462,8 @@ ble_ll_conn_calc_access_addr(void) transitions = 0; consecutive = 0; mask = 0x00000001; - prev_bit = aa & mask; while (mask < 0x80000000) { + prev_bit = aa & mask; mask <<= 1; if (mask & aa) { if (prev_bit == 0) {
