summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2024-07-25 19:03:37 +0800
committerGitHub <[email protected]>2024-07-25 19:03:37 +0800
commitbde4817b9e46bf0b1c2b9bac476c01d02b88618a (patch)
treeea9a1db53c1050069327efb83ddb3743cb9e2cb2 /components
parent30f995dfb4b915031d79e94ac41d2789d14cc97d (diff)
parent1202d51bd64c4a1d442e708eba42d88c1c086016 (diff)
Merge pull request #9228 from messigogogo/master
[BSP/Phytium]适配最新驱动
Diffstat (limited to 'components')
-rw-r--r--components/utilities/ymodem/ry_sy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/utilities/ymodem/ry_sy.c b/components/utilities/ymodem/ry_sy.c
index 89664f1ad9..4bbf816eb8 100644
--- a/components/utilities/ymodem/ry_sy.c
+++ b/components/utilities/ymodem/ry_sy.c
@@ -46,7 +46,6 @@ static enum rym_code _rym_recv_begin(
rt_size_t len)
{
struct custom_ctx *cctx = (struct custom_ctx *)ctx;
- struct stat file_buf;
char insert_0 = '\0';
char *ret;
rt_err_t err;
@@ -64,7 +63,7 @@ static enum rym_code _rym_recv_begin(
cctx->fd = open(cctx->fpath, O_CREAT | O_WRONLY | O_TRUNC, 0);
if (cctx->fd < 0)
{
- rt_err_t err = rt_get_errno();
+ err = rt_get_errno();
rt_kprintf("error creating file: %d\n", err);
return RYM_CODE_CAN;
}