消除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 size;
|
||||
|
||||
RT_ASSERT(rb != RT_NULL);
|
||||
|
||||
*ptr = RT_NULL;
|
||||
|
||||
/* whether has enough data */
|
||||
rt_size_t size = rt_ringbuffer_data_len(rb);
|
||||
size = rt_ringbuffer_data_len(rb);
|
||||
|
||||
/* no data */
|
||||
if (size == 0)
|
||||
|
|
Loading…
Reference in New Issue