提交 bef61a91 编写于 作者: Y yilu.myl 提交者: skylarCai

IssueID:1503:fix wrong sizeof usage

[Detail]
Issue description:
When clean the buffer, use a sizeof(pointer) is not right.

Solution:
Change the pointer to its type to make sure the size if correct.

[Verified Cases]
Build Pass: eduk1_demo
Test Pass: eduk1_demo

Change-Id: Ifb0a05e3fb51a9e51d99fb8a69dd867b892ca5f2
Signed-off-by: Nyilu.myl <yilu.myl@alibaba-inc.com>
上级 6a1657dc
......@@ -33,7 +33,7 @@ int32_t aos_hal_gpio_init(gpio_dev_t *gpio)
aos_gpioc_ref_t *gpioc;
gpioc = aos_malloc(sizeof(aos_gpioc_ref_t));
memset(gpioc, 0, sizeof(gpioc));
memset(gpioc, 0, sizeof(aos_gpioc_ref_t));
int32_t pin_index = gpio->port;
int32_t gpioc_index = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册