Skip to content

Commit 2a1272e

Browse files
authored
消除c99 (#5696)
1 parent 96b4974 commit 2a1272e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/drivers/ipc/ringbuffer.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,14 @@ RTM_EXPORT(rt_ringbuffer_get);
231231
*/
232232
rt_size_t rt_ringbuffer_peak(struct rt_ringbuffer *rb, rt_uint8_t **ptr)
233233
{
234+
rt_size_t size;
235+
234236
RT_ASSERT(rb != RT_NULL);
235237

236238
*ptr = RT_NULL;
237239

238240
/* whether has enough data */
239-
rt_size_t size = rt_ringbuffer_data_len(rb);
241+
size = rt_ringbuffer_data_len(rb);
240242

241243
/* no data */
242244
if (size == 0)

0 commit comments

Comments
 (0)