Skip to content

Fix comment in BackoffAlgorithm_GetNextBackoff #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for backoffAlgorithm Library

## Changes after v1.0.1
- [#27](https://github.com/FreeRTOS/backoffAlgorithm/pull/26) Fix incorrect comment about use of BACKOFF_ALGORITHM_RETRY_FOREVER constant in BackoffAlgorithm_GetNextBackoff API.

## v1.0.1 (February 2020)

### Changes
Expand Down
3 changes: 2 additions & 1 deletion lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ longjmp
mainpage
maxattempts
maxbackoff
maxretryattempts
min
misra
mockrng
Expand All @@ -55,4 +56,4 @@ td
toolchain
tr
trng
utils
utils
2 changes: 1 addition & 1 deletion source/backoff_algorithm.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ BackoffAlgorithmStatus_t BackoffAlgorithm_GetNextBackoff( BackoffAlgorithmContex
assert( pRetryContext != NULL );
assert( pNextBackOff != NULL );

/* If BACKOFF_ALGORITHM_RETRY_FOREVER is set to 0, try forever. */
/* If maxRetryAttempts state of the context is set to 0, retry forever. */
if( ( pRetryContext->attemptsDone < pRetryContext->maxRetryAttempts ) ||
( pRetryContext->maxRetryAttempts == BACKOFF_ALGORITHM_RETRY_FOREVER ) )
{
Expand Down