This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 4661b9f7b2ff503f455299c449d9a45e85b84fb4 Author: huojianchao <[email protected]> AuthorDate: Wed Nov 25 15:19:49 2026 +0800 testing/mm/iob: fix the nxstyle and codespell errors Put the statement of the one-line if blocks that free the IOBs after a failed allocation on its own line in braces ("Statement on same line as 'if'"), and name the function in the comment that codespell reads as a misspelling of "copying". Assisted-by: Kiro:claude-opus-5-5 Signed-off-by: huojianchao <[email protected]> --- testing/mm/iob/iob_main.c | 50 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/testing/mm/iob/iob_main.c b/testing/mm/iob/iob_main.c index b2112e73a..fe9695d06 100644 --- a/testing/mm/iob/iob_main.c +++ b/testing/mm/iob/iob_main.c @@ -455,7 +455,7 @@ static int test_iob_copyin_copyout(void) return -1; } - /* Test copyin */ + /* Test iob_copyin() */ ret = iob_copyin(iob, src_data, TEST_DATA_SIZE, 0, false); if (ret < 0) @@ -538,9 +538,21 @@ static int test_iob_queue_operations(void) if (iob1 == NULL || iob2 == NULL || iob3 == NULL) { printf("ERROR: Failed to allocate IOBs\n"); - if (iob1) iob_free(iob1); - if (iob2) iob_free(iob2); - if (iob3) iob_free(iob3); + if (iob1) + { + iob_free(iob1); + } + + if (iob2) + { + iob_free(iob2); + } + + if (iob3) + { + iob_free(iob3); + } + return -1; } @@ -681,8 +693,16 @@ static int test_iob_chain_operations(void) if (iob1 == NULL || iob2 == NULL) { printf("ERROR: Failed to allocate IOBs\n"); - if (iob1) iob_free(iob1); - if (iob2) iob_free(iob2); + if (iob1) + { + iob_free(iob1); + } + + if (iob2) + { + iob_free(iob2); + } + return -1; } @@ -1046,9 +1066,21 @@ static int test_iob_queue_concat(void) if (iob1 == NULL || iob2 == NULL || iob3 == NULL) { printf("ERROR: Failed to allocate IOBs\n"); - if (iob1) iob_free(iob1); - if (iob2) iob_free(iob2); - if (iob3) iob_free(iob3); + if (iob1) + { + iob_free(iob1); + } + + if (iob2) + { + iob_free(iob2); + } + + if (iob3) + { + iob_free(iob3); + } + return -1; }
