Skip to content

Commit 1e5dd14

Browse files
authored
Fix comment in BackoffAlgorithm_GetNextBackoff (#27)
Fix invalid comment about meaning of **BACKOFF_ALGORITHM_RETRY_FOREVER** constant in `BackoffAlgorithm_GetNextBackoff`API. The issue was pointed in #26.
1 parent 7416979 commit 1e5dd14

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog for backoffAlgorithm Library
22

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

58
### Changes

lexicon.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ longjmp
3131
mainpage
3232
maxattempts
3333
maxbackoff
34+
maxretryattempts
3435
min
3536
misra
3637
mockrng
@@ -55,4 +56,4 @@ td
5556
toolchain
5657
tr
5758
trng
58-
utils
59+
utils

source/backoff_algorithm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ BackoffAlgorithmStatus_t BackoffAlgorithm_GetNextBackoff( BackoffAlgorithmContex
4444
assert( pRetryContext != NULL );
4545
assert( pNextBackOff != NULL );
4646

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

0 commit comments

Comments
 (0)