diff options
| author | Bernard Xiong <[email protected]> | 2021-05-28 16:20:08 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-28 16:20:08 +0800 |
| commit | 92beddf3bccf6346e26aa097f82464456fb8e6bd (patch) | |
| tree | 197e4a108118dda016ea02274172f0c40e7ee8ed /components/vbus/vbus.c | |
| parent | b18a99b44240ec3152011e159cc24a5af8dff0ce (diff) | |
| parent | 03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff) | |
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'components/vbus/vbus.c')
| -rw-r--r-- | components/vbus/vbus.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/vbus/vbus.c b/components/vbus/vbus.c index 8add15d9db..e24a0eed0e 100644 --- a/components/vbus/vbus.c +++ b/components/vbus/vbus.c @@ -1,6 +1,6 @@ /* * COPYRIGHT (C) 2018, Real-Thread Information Technology Ltd - * + * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: @@ -899,8 +899,8 @@ int rt_vbus_request_chn(struct rt_vbus_request *req, int timeout) { int i, chnr, err; - size_t plen = rt_strlen(req->name) + 2; - unsigned char *pbuf; + size_t plen = rt_strlen(req->name) + 2; + unsigned char *pbuf; rt_ubase_t lvl; lvl = rt_hw_interrupt_disable(); @@ -930,8 +930,8 @@ int rt_vbus_request_chn(struct rt_vbus_request *req, goto _waitforcmp; } - pbuf = rt_malloc(plen); - if (!pbuf) + pbuf = rt_malloc(plen); + if (!pbuf) { rt_hw_interrupt_enable(lvl); return -RT_ENOMEM; @@ -944,7 +944,7 @@ int rt_vbus_request_chn(struct rt_vbus_request *req, rt_memcpy(pbuf+1, req->name, plen-1); vbus_verbose("%s --> remote\n", dump_cmd_pkt(pbuf, plen)); - err = _chn0_post(pbuf, plen, RT_WAITING_FOREVER); + err = _chn0_post(pbuf, plen, RT_WAITING_FOREVER); rt_free(pbuf); _waitforcmp: |
