xiaoxiang781216 commented on code in PR #7776: URL: https://github.com/apache/nuttx/pull/7776#discussion_r1041706459
########## drivers/video/video_framebuff.c: ########## @@ -46,24 +46,13 @@ static void init_buf_chain(video_framebuff_t *fbuf) fbuf->vbuf_tail = NULL; tmp = fbuf->vbuf_alloced; - for (i = 0; i < fbuf->container_size - 1; i++) + for (i = 1; i < fbuf->container_size; i++) { tmp->next = &tmp[1]; tmp++; } } -static void cleanup_container(video_framebuff_t *fbuf) -{ - if (fbuf->vbuf_alloced) - { - memset(fbuf->vbuf_alloced, - 0, - sizeof(vbuf_container_t)*fbuf->container_size); - init_buf_chain(fbuf); - } -} - static inline int is_last_one(video_framebuff_t *fbuf) Review Comment: @pkarashchenko since the whole video_framebuff.* doesn't add FAR, it's better to do FAR addition to the new patch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org