Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Minor typo bug in peer_manager.c (still works as expected)

Affects nRF5 SDK v13.0.0 - v15.0.0

I noticed a minor bug in peer_manager.c, lines 972-975 (v15.0.0). Looks like an opening brace is on an incorrect line, see line 5 in snippet below:

if (err_code != NRF_SUCCESS)
{
    m_peer_rank_token    = PM_STORE_TOKEN_INVALID;
    m_current_highest_peer_rank -= 1;
    {
    if ((err_code != NRF_ERROR_BUSY) && (err_code != NRF_ERROR_STORAGE_FULL))
        err_code = NRF_ERROR_INTERNAL;
    }
}

I'm assuming the opening brace for the inner `if` condition should be after the condition instead of before... Luckily it still operates as intended since the block is a single statement, however this probably should be addressed

Related