You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2022/06/14 12:56:23 UTC
[incubator-nuttx-apps] branch master updated: testing/irtest: Fix issue of failure to open multiple IR devices
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 068905d07 testing/irtest: Fix issue of failure to open multiple IR devices
068905d07 is described below
commit 068905d07b756d7e429f673ff4bcb9c7e56d28b7
Author: chenwen@espressif.com <ch...@espressif.com>
AuthorDate: Tue Jun 14 16:36:11 2022 +0800
testing/irtest: Fix issue of failure to open multiple IR devices
Signed-off-by: chenwen@espressif.com <ch...@espressif.com>
---
testing/irtest/cmd.cxx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/testing/irtest/cmd.cxx b/testing/irtest/cmd.cxx
index 99bb4938a..c52cb4ff2 100644
--- a/testing/irtest/cmd.cxx
+++ b/testing/irtest/cmd.cxx
@@ -189,11 +189,13 @@ CMD1(open_device, const char *, file_name)
}
int index = 0;
- for (; index < CONFIG_TESTING_IRTEST_MAX_NIRDEV &&
- g_irdevs[index] == -1; index++)
+ for (; index < CONFIG_TESTING_IRTEST_MAX_NIRDEV; index++)
{
- g_irdevs[index] = irdev;
- break;
+ if (g_irdevs[index] == -1)
+ {
+ g_irdevs[index] = irdev;
+ break;
+ }
}
if (index == CONFIG_TESTING_IRTEST_MAX_NIRDEV)