mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 21:30:24 +08:00
消除c99 (#5696)
This commit is contained in:
parent
96b4974ea2
commit
2a1272ecfb
@ -231,12 +231,14 @@ RTM_EXPORT(rt_ringbuffer_get);
|
|||||||
*/
|
*/
|
||||||
rt_size_t rt_ringbuffer_peak(struct rt_ringbuffer *rb, rt_uint8_t **ptr)
|
rt_size_t rt_ringbuffer_peak(struct rt_ringbuffer *rb, rt_uint8_t **ptr)
|
||||||
{
|
{
|
||||||
|
rt_size_t size;
|
||||||
|
|
||||||
RT_ASSERT(rb != RT_NULL);
|
RT_ASSERT(rb != RT_NULL);
|
||||||
|
|
||||||
*ptr = RT_NULL;
|
*ptr = RT_NULL;
|
||||||
|
|
||||||
/* whether has enough data */
|
/* whether has enough data */
|
||||||
rt_size_t size = rt_ringbuffer_data_len(rb);
|
size = rt_ringbuffer_data_len(rb);
|
||||||
|
|
||||||
/* no data */
|
/* no data */
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user