]> begriffs open source - freertos/commit
Fix incorrect error checking of prvCreateIdleTasks (#1158)
authorkakkoko <parenthesized.ko@gmail.com>
Wed, 16 Oct 2024 09:36:20 +0000 (18:36 +0900)
committerGitHub <noreply@github.com>
Wed, 16 Oct 2024 09:36:20 +0000 (15:06 +0530)
commita49c35b5dc0f1f521eef3ef993d401af7f26f439
treefae8dc39510f84c1ce47142a7052a41c085e725a
parent5f3bab1a3242640c6e031d9cfb1be756bd76fb3c
Fix incorrect error checking of prvCreateIdleTasks (#1158)

In environments that do not support static allocation
(configSUPPORT_STATIC_ALLOCATION == 0), at prvCreateIdleTasks(), call
xCreateTask() and compare its return value to pdFAIL to check whether
xCreateTask() failed. However, xCreateTask() returns
errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY as the error value, so the
result of this comparison is always false.

This commit fixes this problem by changing the return value comparison
to pdPASS instead of pdFAIL.
tasks.c